Jump to content

move object along path with physics


DerDree
 Share

Recommended Posts

I am currently trying out point and click movement of objects. Therefore I use a pathfinding algorithm to calculate a path along the map and around walls and other colliders. Then I let the object move to every waypoint one after another with moveToXY().

 

Here is now my problem: When the object collides on its way with a wall because its moving a bit to close along it immediatly stops with a slow velocity in one direction. I think the physics engine stops the whole object (setting the velocity) because it slightly collided with a wall.

 

But how can I fix this? I think a solution would be, to tell the object not to change its velocity on collision but keep pushing in the direction.

 

It needs to be physics based movement because I want to simulate lots of objects moving through a door and pushing each other away. So a tween is no object I think.

 

I hope someone here knows a solution. Thanks :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...