How to Change Velocity to where touch is pressed

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited July 2012 in Working with GS (Mac)
Hi guys,

I feel really bad asking this question because it should be simple - maybe I'm having a really bad day.

I want an actor to Change Velocity in the direction of where I'm touching.
How would I go about doing that?

Thanks for your help.
Braydon

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Change/constrain the direction to vectorToAngle(game.Mouse.Position.X-self.Position.X,game.Mouse.Position.Y-self.position.Y). You can wrap this in a When Mouse Button is down rule or inside of a timer set to every 0 seconds.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited July 2012
    @titiang - I got it working - thanks for the fast response! Don't know why I couldn't figure that out...
Sign In or Register to comment.