physical response problem

Game Editor comments and discussion.

physical response problem

Postby BogdansB » Sun Nov 06, 2011 4:44 pm

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 :?
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score

Re: physical response problem

Postby skydereign » Mon Nov 07, 2011 12:24 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: physical response problem

Postby BogdansB » Mon Nov 07, 2011 5:54 am

but i want t omake the actor move to the player
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score

Re: physical response problem

Postby skydereign » Mon Nov 07, 2011 6:51 am

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
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest