-
Custom Movement help.
how do I make an object move fluidly up?
I've tried
repeat while up key is pressed - Y( "Active" )-5
but that doesn't quite work right..
basically would like to add to a direction in small increments
(somewhat trying to learn to create custom movements, and learn how it's done)
-
The first derivative of position is velocity or speed, that is, the amount position changes over time. To implement this, you need to make two values called X Speed and Y Speed, and use the events:
Always: Set X Position to X+X Speed
Always: Set Y Position to Y+Y Speed
This will make the player move in linear motion, that is, a constant, uniform speed relative to the speed value. The second derivative of position, or the first derivative of velocity, is acceleration, which is the amount velocity changes over time. To implement this, you have to make two values called X Acceleration and Y Acceleration, and use the events:
Always: Set X Velocity to X Velocity+X Acceleration
Always: Set Y Velocity to Y Velocity+Y Acceleration
This will make the velocity change linearly, a constant change over time. However, this makes the player's position change exponentially, showing acceleration since you're dealing with its second derivative. To accelerate upwards, set Y Acceleration to -1 :)
-
oh word, thanks for that. I'm gonna see if I can't set that up.
-
I had this working when I first posted this, but now weeks later I can't seem to getting working again, lol..
X+XSpeed( "Hero" )
this gives me a syntax error when I try to set x position on an always condition..
I know the above post by Jacob works because I did this a week ago or something, but can't seem to get it now..
-
It doesn't know what just "X" is by itself. You probably meant X("Hero")+XSpeed("Hero")
-
lol, that makes perfect sense.