Page 1 of 1

physical response problem

PostPosted: Sun Nov 06, 2011 4:44 pm
by BogdansB
hi,
im doing a game where a player and another actor is. they are on ice and they move like on ice. the actor is "move to player->0x 0y" . now i want to make that when they collide with each other there is a phisical response with a bit bounce, but when i try it the actor is not bouncing he just go some pixels away from the player :(

help me pls :?

Re: physical response problem

PostPosted: Mon Nov 07, 2011 12:24 am
by skydereign
This isn't the kind of thing you should use MoveTo for. Really all you need are PhysicalResponse and use of xvelocity. So, for example have two actors, set ones xvelocity so it will hit the other. Then have a collision event that has a PhysicalResponse that moves both actors. I think leaving it at its default will work for what you want.

Re: physical response problem

PostPosted: Mon Nov 07, 2011 5:54 am
by BogdansB
but i want t omake the actor move to the player

Re: physical response problem

PostPosted: Mon Nov 07, 2011 6:51 am
by skydereign
Okay, you have two actors, actor_a and actor_b.
actor_a -> Create Actor -> Script Editor
Code: Select all
xvelocity=5*(x<actor_a.x - x>actor_a.x);


actor_a -> Collide with actor_b -> Script Editor
Code: Select all
//put the PhysicalResponse here