Jump to content

Recommended Posts

Posted

I have a big problem.

I need to call collision callback function every frame whenever a model is in contact with the ground.

However, whenever the body is inactive (or not-moving) the callback doesn't seem to get called.

Let me show you what I mean.

 

normalr.png

Now notice the UpdateCollision() function being called & the ball behind it being active (or moving) and shown in green in physics debug mode.

 

errortl.png

However, if you see the picture above, the function does not get called (should be called between PreUpdate() and PostUpdate()) when the ball in inactive. The ball is shown in red in debug mode.

 

Now is this normal or is it just a bug?

This functionality takes up a crucial part of the my game, and I can't find any other solution.

 

Thanks for taking interest.

Blog & Portfolio

 

Current project: moon.chase.star

Posted

I believe that is intended. But maybe what you can do, is pull a distance check from the entity that your ball collided with, and if its 0 assume the collision is still happening. ?

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Posted

I believe that is intended. But maybe what you can do, is pull a distance check from the entity that your ball collided with, and if its 0 assume the collision is still happening. ?

How would you check the distance check from the surface of a sphere?

I can only think of distance check from the sphere's center.

 

EDIT: Oh wait, EntityDistance()... will give that a go

EDIT2: EntityDistance( _ball, _ground ) is never returning 0... some value like 3.65 . Am I doing this right? This is insanely frustrating.

Blog & Portfolio

 

Current project: moon.chase.star

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.

×
×
  • Create New...