mdidillon Posted January 23, 2010 Share Posted January 23, 2010 Hello everyone, I bought LE Engine at the beginning of this week and finally have some time to play around with it. So far I really love it. I am using the C++ interface. Currently I am writing a little multiplayer physics game, just to get used of everything. I have some problems with ScaleEntity in combination with the physic/collision engine. If I create a body and a mesh and make the mesh child of the body and then scale the body entity, the collision/physics does not work anymore (the scaled object does not collide anymore with other objects). My first thought was that the body position and dimension is not equal to mesh representation, but physics debug mode showed that they are equal. Everything works fine if I set dimension of body and mesh separately, before it parent the body with the mesh. Here is the code: This works: TBody body=CreateBodyBox(2,2,2); SetBodyMass(body,1); TMesh mesh=CreateCube(); ScaleEntity(mesh, Vec3(2,2,2)); EntityParent(mesh,body) This does NOT work (no collision/physic interaction anymore): TBody body=CreateBodyBox(); SetBodyMass(body,1); TMesh mesh=CreateCube(); EntityParent(mesh,body); ScaleEntity(body, Vec3(2,2,2)); Is this meant to be like that? marc Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted January 23, 2010 Share Posted January 23, 2010 Please put code in code tags. Yes, it is meant to be like that. You can't scale physics bodies. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Rick Posted January 23, 2010 Share Posted January 23, 2010 Remember that because it'll bite you many times most likely. You cannot scale physics bodies. Well, it'll let you, but it they won't work correctly. That's probably the part that's confusing. Quote Link to comment Share on other sites More sharing options...
mdidillon Posted January 23, 2010 Author Share Posted January 23, 2010 Good to know. Thanks Quote 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.