problem with move actor straight

ronreronre Member Posts: 38

hey,
in actor i have:
constrain attribute: self.angletotarget To: vectorToAngle( game.targetX - self.Position.X , game.targetY - self.Position.Y )
constrain attribute: self.Rotation To: self.angleToTarget +(30*cos( self.Time *500))
those to attributes move the actor to a specific target in Zig-Zag.

I made a rule with a table that choose random "direction" (straight ,zig-zag)
my problem is if i want the hero to move straight is the "self.rotation", if i erase the "(30*cos( self.Time *500))" the hero don't move to his target.
i guess i did a mistake somewhere :neutral:

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I'm not sure why it's not working for you. You didn't mention how you're moving the actor --

    those [two] attributes move the actor to a specific target in Zig-Zag

    They don't actually move the actor but they would make it look like it was rotating back and forth --

    Here's a demo of what you described using Move To.

    Disclaimer: No unicorns were harmed in the making of this demo.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.