I’m trying to create a system, which would cause my character run at the exact walkspeed of 16, using the VectorForce, as it is not linear and allows an object or character move whichever side you want. For context, I’m also using the system which makes character walk by holding LMB. However, I can’t understand on how to apply the force to my character, that way it maches the walkspeed of 16.
How would I make it? Or maybe I should try something different, instead of VectorForce?
If you’d like to continue using a VectorForce, then you’ll need to implement some kind of drag or friction force in-order to prevent the speed from increasing beyond 16
I suspect that using a LinearVelocity would make it much easier to achieve what you’re looking for, though ![]()
![]()
The thing is that the character can rotate while holding LMB, but LinearVelocity makes him walk only straight, without being able to change paths.
That shouldn’t be the case, so do make sure that you’re still changing the velocity’s direction so that it matches with the character’s rotation. You could also try changing the VelocityConstraintMode to Line, which makes it easier to change the direction, since it’s now a separate property from the speed (you’ll no longer need to multiply the direction by the speed in code if you decide to do this)
Oh bruh, made it. Thank you so much.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.