PDA

View Full Version : Moving Objects



Bob W
10-08-2000, 03:35 PM
I am trying to move two pistons on the screen up and down, and want to adjust the speed at which they are moving. Any suggestions?

NewROmancer
10-08-2000, 10:44 PM
Create an object piston, make properties x,y,z being the coordonates and at each frame you modify their value and paint the objects at the coordinates you provide.

NewROmancer

Bob W
10-09-2000, 12:23 PM
I can get it to draw them ok. I t is just that I can't change the speed at which they are moving.

Originally posted by NewROmancer:
Create an object piston, make properties x,y,z being the coordonates and at each frame you modify their value and paint the objects at the coordinates you provide.

NewROmancer

Don't Disturb
10-10-2000, 03:29 AM
What's a question like this doing on the advanced board?

for pistons going up and down, you probably want to use a sine wave.
displacement = MAX_DISPLACENT * sin(timer() * speed);