#Skateboard game Speed Mechanics.

1 messages · Page 1 of 1 (latest)

tribal drift
#

In my skating game i want the speed to slowly and smoothly decrease over time but idk how to get something like that, i also want the speed to increase when going down ramps, idk if i should use friction? or change the way i handle velocity entirely by using move_towards even tho i don't fully understand how that works.

The direction is decided by the slope the player is standing on, so he goes through ramps smoothly, and has a nice upward boost.

the groundspeed is just speed, but i want to have different speeds for when the player is jumping or falling.

the big thing i'm looking for is a nice way to handle velocity and speed, because i think i'm looking at it wrong,

tidal pendant
#

Maybe you could have the skateboard be a VehicleBody3d and let the physics engine handle inclines and declines

nova lintel
tribal drift
#

i dont think so

nova lintel
#

Nope

#

At least not 3d physics objects in 2d physics space

tidal pendant
#

I would try to let the physics engine do the work for me and work with impulses to raise speed/ollie and friction/uphills to lower it.

raw tinsel
#

you can use tweens to smoothly lerp properties of the skateboard depending on the terrain but a vehicle simulation library might be worth looking into (if one exists)

tribal drift
#

i think i found a way, i separate the velocity into x and y, and then keep using the direction variable i already had, thats based on the slope.

then for going downhills, i wanna use lerp somehow but i don't rly remember how it worked, i can only find people using vector2 lerp and not just normal lerp

tribal drift
#

it kinda works, it isnt that refined but i can do something with this

#

however the slope and radians in godot are so weird nad i do not understand any of it, why isn't a level surface a degree of 0 instead of -90? did i fuck it up somehow, what i would LOVE is that level would be 0 degrees and against a wal 90, and then the same the other way around or negative idk

#

is godot degree system just quirky like this or did i fuck it up