Actor movements up and down
PBEmpire
Member Posts: 676
I have actors that loop up and down. I have them placed in a straight line so that they move up and down at the same time. However after a few loops, some actors are slightly ahead of the others although they are supposed to go in a straight line. All of them have friction and density set to 0 and bounciness set to 1. I am using the velocity rule as i want them to hit the wall and move the opposite direction.
I saw the sin,cos method but i could not figure a way to make them hit the wall and then bounce back. Any ideas on how to constrain them into moving with others?
I saw the sin,cos method but i could not figure a way to make them hit the wall and then bounce back. Any ideas on how to constrain them into moving with others?
Comments
here is a template I made while practicing with the technique
http://yadi.sk/d/I3IxuCOT5t38e
it has examples of a moving sine wave, stationary X, Stationary Y, Circles, Ovals, and a moving circling corkscrew kind of thing too
were you being sarcastic there?
also forgot to mention, if you were to constrain one actors self.time to a global, then you could have all of them reference it in the sine equation and they would be perfectly aligned at all times regardless of lag or spawn order etc.
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
I saw one of the sine template and it was something i would like to have but i could not find a way to make the actor collide into a wall and go the opposite way as in my game, the walls can move if a certain action takes place.
Idea #2... take the physics off of all but the first actor, then constrain the rest of the actors to the first ones self.y through a global attribute?
Here is the link to my problem.. Anyone can figure out what is causing this?
I didn´t implement it dirrectly into the project because I wanted other people also to use the technique. Head over to it
//Fajlajp