Warner engine problems with physics, collisions...

BlitzMax Forums/OpenGL Module/Warner engine problems with physics, collisions...

Arska(Posted 2011) [#1]
I started to use Warners engine and encountered some problems. I created some cubes with newton physics, but i can't scale them with scaleentity. When cube gets collided it returns to it's normal size. :/

Another problem is how i check if entity is collided? (Not Newton object)

I also wanna know how do i get collision between normal entity and physics entity. For example, i want player entity to be able to push physic objects out of the way.

And for last, how do i check distance between 2 entities?

Warner(Posted 2011) [#2]
The engine is still experimental. I haven't had the time to create a real project with it. So bugs may appear.
The first issue -the scaling error- could be such a bug. I'll look into it, but it might take some time. Maybe you could use ScaleMesh instead?

Here is an example that shows how to check for collision:

I'll add "CollisionEntity" to the engine later on, which should be more convenient for this purpose.

To get the distance between two entities, add the following lines to either your code or to "engine.bmx". If you add them to engine.bmx, you can use them in other projects as well. You'll need to rebuild the module first (Ctrl+D).

Arska(Posted 2011) [#3]
Thanks Warner. Scalemesh works. I really like your engine so keep up good work. ;)

Edit: oh and is still need help to do this if it's possible
"I want player entity to be able to push physic objects out of the way."

Last edited 2011

Warner(Posted 2011) [#4]
I'm not sure how to do that. Could be something like this:
-make the player entity a physics object as well
-create a physics object, and every frame, place it where the player is
-for each collision, apply force on the attached physics object