[CryEngine 5.4] Collisions in C++: How do they work, and what's required?

Hey hey,

For a project a couple of friends and I are working on we're creating a small game using C++ - No C# or Lua allowed!
We have yet to find a way to make Collision work, and some help or tips would be greatly appreciated.

So far, we have found and implemented IEntityBasicTypes.h's 'ENTITY_EVENT_COLLISION' into our ProcessEvent() function, which also handles our ENTITY_EVENT_UPDATE (Which is working fine as is). The issue is that the 'ENTITY_EVENT_COLLISION' is never called. The objects we wish to apply Collision to both are Physicalized and using the 'p_draw_helpers=1' in the console shows that the colliders we are working with do overlap.

Is there anything else that we have to do to the objects in order for the Event to trigger? Or is there an easier way to implement collision?

Re: [CryEngine 5.4] Collisions in C++: How do they work, and what's required?

Hey DurinKompier,

In code, make sure you add the event to your components GetEventMask method, then your component will be able to receive these events through the ProcessEvents method.
In the editor, make sure you have a RigidBody component attached to the same entity you wish to receive collision events for.

Let us know if you still have issues.
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 2 guests