mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
This commit is contained in:
@@ -339,6 +339,7 @@ export class PhysXSharedBody {
|
||||
}
|
||||
|
||||
setGroup (v: number): void {
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word0 = v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
@@ -348,17 +349,19 @@ export class PhysXSharedBody {
|
||||
}
|
||||
|
||||
addGroup (v: number): void {
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word0 |= v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
|
||||
removeGroup (v: number): void {
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word0 &= ~v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
|
||||
setMask (v: number): void {
|
||||
if (v === -1) v = 0xffffffff;
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word1 = v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
@@ -368,11 +371,13 @@ export class PhysXSharedBody {
|
||||
}
|
||||
|
||||
addMask (v: number): void {
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word1 |= v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
|
||||
removeMask (v: number): void {
|
||||
v >>>= 0; //convert to unsigned int(32bit) for physx
|
||||
this._filterData.word1 &= ~v;
|
||||
this.updateFilterData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user