Jump to content

Collision Callback Information


smashthewindow
 Share

Recommended Posts

I think it's neither. It's the global position of the collision itself. For example if two spheres collide, it would be a point on both sphere's hull.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I think it's neither. It's the global position of the collision itself. For example if two spheres collide, it would be a point on both sphere's hull.

 

But then how would the normal or force vector be expressed in global coordinate?

Also is there a LE function to change position relative to entity0?

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

I'm thinking of a teleport function which moves an entity with exactly the same movement info and relative position to the entrance as it came in, which is why I need the normals and the force.

Does the movement info ( velocity, force) get preserved after PositionEntity()?

I don't have access to a Windows platform till next weekend so unfortunately I cannot test this...

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

The position and normal are in global space.

 

There is no way to reposition a physics body without losing one frame of physics interactions, but you are unlikely to run into trouble. I would just get the velocity and angular velocity, then reposition the body, then set the velocities to what they just were. I would probably not do this in the collision callback, just set a value and then reposition the body after UpdatePhysics is finished, back in the main program body.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...