change direction only not velocity?
i need my actor when hitting this corner to change the direction to certain degree but to keep same velocity is going, i cant use when hitting actor change velocity to ??? ,direction 90 degrees, i need the actor to have same velocity is going
Comments
Do you mean that you want to change the rotation of the actor (while keeping it's current speed and direction (velocity)? (That would require a rotate behavior).
Or do you mean you want to bounce the actor (change the direction of movement but retain the same speed)? (That would require a change attribute behavior. Or a change velocity behavior.)
Or perhaps I don't quite understand what you want yet. Can you give a little more information?
RThurman
The balls collide off of each other and the walls and maintain a constant speed. It is not easy and requires a bit of math, but you are free to dig through the code.
Hope this helps!
Joe
http://www.miniputtgames.com/1-4playerminigolf.php
sorry i don know how do the link thing
The collide behavior is exactly made for this kind of thing. You will need to fiddle with both actor's density, restitution, and other physics a little bit, but basically an actor will change direction in a realistic manner if you use the collide behavior.
RThurman