Using ContactListener for Virtual Character #1363
Replies: 2 comments
-
Please take a look at this thread here: #1027
This works fine for me. I adjusted the CharacterVirtualTest sample to show that it works (you'll see a green box appear around the character on entering the sensor): Character.zip |
Beta Was this translation helpful? Give feedback.
-
Ah yes, it works now, apparently I mixed up some of the layers. Thank you |
Beta Was this translation helpful? Give feedback.
-
I have a Virtual Character in my scene.
ContactListener currently works between other non-character rigid bodies, inclusive of sensors, dynamic bodies, kinematic bodies and static bodies.
I've previously tried to use CharacterContactListener for my character, but I realised that CharacterContactListener only has an OnContactAdded.
However, for the purpose of my game engine, I will need OnContactAdded, OnContactPersisted and OnContactRemoved as per the ContactListener class. Hence, I attempted to use an inner rigid body in my virtual character, which was successfully created as I have seen from the debug renderer for bodies. However, the inner rigidbody doesn't seem to trigger the ContactListener. May I check if there's any ways to allow my character to receive persisted and removed callbacks for collision?
Beta Was this translation helpful? Give feedback.
All reactions