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

(physx worker bug) - Contacts involving a vehicle are not detected #30

Open
nebular opened this issue May 14, 2024 · 2 comments
Open

(physx worker bug) - Contacts involving a vehicle are not detected #30

nebular opened this issue May 14, 2024 · 2 comments

Comments

@nebular
Copy link

nebular commented May 14, 2024

(physx) Adding a contact between a vehicle and a body is never triggered.

However, the worker does detect the contact - it only doesn't find the name of the object so it doesnt call the callback.

Screenshot 2024-05-14 at 20 58 16
In the supplied screenshot - when the worker receives the "addVehicle" - it just lacks:

case "vehicle":
     C.set(A.vehicleActor.ptr, A.name);

then later on, Q is found correctly as the vehicle and the callback reaches phy.

Screenshot 2024-05-14 at 21 01 29

@nebular
Copy link
Author

nebular commented May 19, 2024

Also, if I add a Ray with a vehicle as Parent - there is the same problem but worse: The Worker will die because A.getGlobalPose is undefined (rather being A.vehicleActor.getGlobalPose).

0], this.end = A.end || [0, 0, 1], this.precision = A.precision || 1, this.group = void 0 !== A.group || 16, this.mask = void 0 !== A.mask || 2;}

	getPoint() {
		if (this.parent) {
			const A = Q.byName(this.parent);
			if (A) {
				const I = A.getGlobalPose(),
					g = I.p.toArray(),
					C = I.q.toArray();
				return [p.applyTransformArray(this.begin, g, C), p.applyTransformArray(this.end, g, C)];
			}
		}
		return [this.begin, this.end];
	}
}

a simple fix:

				const I = A.type === "vehicle" ? A.vehicleActor.getGlobalPose() : A.getGlobalPose,

@lo-th
Copy link
Owner

lo-th commented May 21, 2024

Hi yes vehicle have specific rigidbody in physx
i have to try is about collision filter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants