Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support friction CCFLOAT #17761

Open
wants to merge 1 commit into
base: v3.8.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ native/external/

!templates/**/*
templates/**/.DS_Store
templates/**/.gradle

platforms/runtime/local-commit.json
platforms/runtime/common/web-adapter.js
Expand Down
18 changes: 6 additions & 12 deletions cocos/physics/framework/assets/physics-material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ export class PhysicsMaterial extends Asset {
}

set friction (value) {
if (!math.equals(this._friction, value)) {
this._friction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}
this._friction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}

/**
Expand All @@ -85,10 +83,8 @@ export class PhysicsMaterial extends Asset {
}

set rollingFriction (value) {
if (!math.equals(this._rollingFriction, value)) {
this._rollingFriction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}
this._rollingFriction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}

/**
Expand All @@ -104,10 +100,8 @@ export class PhysicsMaterial extends Asset {
}

set spinningFriction (value) {
if (!math.equals(this._spinningFriction, value)) {
this._spinningFriction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}
this._spinningFriction = value;
this.emit(PhysicsMaterial.EVENT_UPDATE);
}

/**
Expand Down
Loading