Is there a way to ease the movements of an actor so they don't instantly start and stop?
grierdill
Member Posts: 16
I'm using the really simple, "change attribute self.linear velocity," to move my player around and was wondering how to ease the start and stop of the movement, almost as if they were walking on ice. I'm experimenting with "interpolate" but it seems to mess up the movement more than it helps. Cool, any help would be awesome, totally new to GS.
Answers
A probably less problematic way would be not to adjust the actors linear velocity directly, but use a move behavior. This will give you less control but will be easier to create a movement system. you will need to create a counter system that slows the actor to a halt when the user is not pressing the joystick/screen or whatever.
Obviously we don't know what you are trying to accomplish though. "move my player around" is very vague. There's probably a much more efficient way of accomplishing what you'd like.
Basically I'm trying to create a pretty traditional sidescrolling platformer, with nice smooth controls. Since I'm just starting, I don't really know the "best practices" with the program, things to avoid, or behaviors that'll cause more problems later on.
Thanks for the tip though, I'll keep trying different things
aha! I found it!
simple demo: http://www.mediafire.com/?xc7qb38n97o31c4
MH
Also as @mr.rinoy said if you don't want it to keep accelerating to super fast speed then set and apply a max speed in the actor attributes.
Cheers
I did use the accelerate and friction to speed up and slow down, but instead of the attribute Max Speed, I made a new a speed limit rule so if the actor's linear velocityX is ≥ 200, for the linear velocityX to = 200 this way the linear velocityY won't be affected when he jumps or falls.
Now I'm just trying to tweak it because when the actor jumps and lands on the ground, it re-accelerates from 0, giving it this little hiccup. So I'm trying to make it recognize if the actor is already moving and if so than just Change Attribute, linear velocity, but if the actor is still, then use accelerate. Its not working perfectly yet, but getting there.
goto moving actor and change the Drag attribute in the physics section to 0. this makes it infinitely slippery . then instead of using interpolate or constraint attribute use the accelerate or accelerate towards.
can i get an "insightful"
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page