Hello, I have a project about a skateboard, it rides on slopes and ramps, but I want it to pick up speed when it goes off the ramp, and when it goes up the ramp, the speed decreases, the skate is like a board skeleton mesh in my character drawing

Hello, I have a project about a skateboard, it rides on slopes and ramps, but I want it to pick up speed when it goes off the ramp, and when it goes up the ramp, the speed decreases, the skate is like a board skeleton mesh in my character drawing

You need to check the moment of time when it goes off the ramp.

You can do it, with a collision or check with a trace , and launch character or add force simply as impulse.

I can be more helpfull if you can demonstrate with a drawing or simply with a video.

Hello, I’m sorry for the delay, so I attached the video. I want it to roll down when it stops, and when it picks up, it slows down.

the same as the physics of the cart

Well, I am assuming you are using default movement component. Default movement component doesn’t use phsyics simulation. Every movement on it is simulated specific to gameplay. Sometimes there is ofcourse physics involved or its calculations like gravity calculations. On you example its walking basically on to a slope which is allowed and not sliding down cause its walkable. If its not walkable it would have slided down, however lowering the angle of max slope will prevent climbing cause thats how walking works basically.

If you want to use current system basically: you have to get ground angle normal and apply an additional movement input to the direction of skate facing.

So what needs to be done actually you have to extend the movement component according to gameplay needs with thirdperson camera in mind.

Basically in extended movement.

  • No lateral movement if forward velocity zero
  • Lateral movement is multiplied by a factor of velocity than turns applied to actor.
  • ground detection and ground angle detected and applied as force to actor on ramps.
  • camera leaning turns, camera leans character and an additional force applied on top of turns which influences turns from controller + camera revert directions so its a better gameplay ux when player wants to look back while driving forward etc.
  • ofcourse need to calculate camera facing direction to influence
  • various jump calculations to do the tricks etc.

Basically we have to make a skateboard vehicle movement for it. C++ required for it. Maybe you can use flying movement or chaos vehicle class to fake it still think it would be not the correct way since its custom movement, leans, tricks, flips etc.

However if you want to fake the movement by simulated physics , it can be done somewhat fairly. Not sure you are possesing a new pawn for skateboard or you are using the existing character/pawn for it. I just added a sketaboard mechanic on the existing character for a demo.

  • Basically I stop character movement on begin play since its skateboard.
    Apply simulate physics on capsule. Lock its X Y rotation so it doesn’t flip over because of center of mass and capsule shape.
  • Get movement input and for Y forward calculate camera look direction apply to forward vector
  • For X lateral movement, apply a local force in slightly forward or backward location to simulate a torque, also check if there is a velocity 0 - 1 normalized so it doesn’t turns in place when no velocity.

Result is something like below, hope it helps.

4321

Edit

Here is how to detect ground angle and fake an input vector to simulate motion on character without physics (using default movement component)

Result
1234

thank