0 votes

Hi guys, this is my first time using Godot, and I'm very excited.

I have the following problem, maybe you can help me:

I, as the player, want to control a Rigidbody marble/sphere by add_torque.
The camera is following the marble, and I know how to add torque from the Point of View of the Camera. (I used the code from the "Kinematic Character 3D" Demo... :) )

I want the maximum rotational velocity to be capped, such that you cant accelerate on your own beyond a certain velocity. However, this should only count for the velocity added by the player's Input.
So for example, if the marble rolls down a cliff, it should be able to gain more angular velocity than the maximum from the player's Input.

How would I go about implementing this?

Relevant code: (this doesnt work well yet, though; just so you can get an idea)

https://pastebin.com/bekpnyKN

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.