make an actor move to random direction every 1 sec?
POM
Member Posts: 2,599
hey im trying to make a scene with a frog that "jump" (move to) to random directions..
an its not going to well,
im having a progress when i do
every 1 sec
move to random X and random Y relative to scene
BUT i want that the head of the frog will allways point to the front so if it jump backward
the image will rotate to the direction of the movement
so it wont look like it goes in revers
need your help guys
an its not going to well,
im having a progress when i do
every 1 sec
move to random X and random Y relative to scene
BUT i want that the head of the frog will allways point to the front so if it jump backward
the image will rotate to the direction of the movement
so it wont look like it goes in revers
need your help guys
Comments
--Change Attribute: self.RandX = random(?,?)
--Change Attribute: self.RandY = random(?,?)
--Change Attribute: self.Rotation = vectorToAngle(self.RandX, self.RandY) + <some offset depending on which way your art is pointing>
Move To: self.RandX , self.RandY
but my actor is not rotating to the opposite direction when it goes backwards..
i think it has something to do with the "some offset depending on which way your art is pointing"
i dont understand what im suppose to put there, my actor pointing right for default ( ->)
can you help me?!