Actor Movement

runfastrunfast Member Posts: 2
edited November -1 in Working with GS (Mac)
Hi,
I'm new to the GameSalad platform and I've run into bit of a stumbling block. I'm creating an iphone game that is a bit like pool. I have an actor that you can rotate when touch is pressed.

I'm using vectorToAngle( game.Touches.Touch 1.X - self.Position.X , game.Touches.Touch 1.Y - self.Position.Y ). This works great. When I touch the character and spin the mouse around the character rotates.

This is the problem I'm having. When I release the mouse I want the actor to move in the direction that I release it in. I can sort of get this to work using the change velocity attribute. The other problem I'm having is when the character bounces off the walls (which I want to. Basically the actor runs over dots to collect them)eventually it comes to a stop or appears to be but then just spins in a circle or twitches slightly.

I just want the actor to move in the direction I release and then after bouncing of a couple of wall or two to come to a stop.

If anyone has any better ideas of how to do this I am open to them. I've been staring at this for awhile and could use a new set of eyes.

Thanks!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    http://gamesalad.com/game/1111

    and for less bounce lower the restitution in the physics attributes of the actors
  • runfastrunfast Member Posts: 2
    I did change the restitution for the actor and the wall. I'm not opposed to the actor bouncing off the wall. Like I said the game is a bit like pool. The actor is rotated and when released moves to collect the items on the screen. It will hit the wall...bounce around and maybe hit something else.
    What seems to be the problem is when using change velocity behavior the actor will move...then bounce off the wall...move some more. This is fine. What seems to be happening is when the actor comes to a stop..the actor just spins in a circle or will appear to stop but twitch.
    I'm wondering if I am missing something here or if there is a better way to accomplish what I am trying to do.
    Thanks.
Sign In or Register to comment.