smashthewindow Posted December 22, 2011 Share Posted December 22, 2011 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. Now notice the UpdateCollision() function being called & the ball behind it being active (or moving) and shown in green in physics debug mode. 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. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 22, 2011 Share Posted December 22, 2011 So you have this set http://www.leadwerks.com/wiki/index.php?title=EntityCollisionCallback But its only working if the entity is moving? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
smashthewindow Posted December 22, 2011 Author Share Posted December 22, 2011 So you have this set http://www.leadwerks.com/wiki/index.php?title=EntityCollisionCallback But its only working if the entity is moving? Yes. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 22, 2011 Share Posted December 22, 2011 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. ? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
smashthewindow Posted December 22, 2011 Author Share Posted December 22, 2011 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. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 22, 2011 Share Posted December 22, 2011 you should know the size of the entity, so yes, you would have to take that into account. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
smashthewindow Posted December 23, 2011 Author Share Posted December 23, 2011 you should know the size of the entity, so yes, you would have to take that into account. Ended up solving it completely differently, but thanks for the reply. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 23, 2011 Share Posted December 23, 2011 no problem. glad you solved it. The objective was to solve your issue not be right. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Recommended Posts
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.