Is apply_torque_impulse missing in GoDot 3.0.2 ?

GarromOrcShamanGarromOrcShaman Posts: 31Member

Hi. According to this Docs page there is function called "apply_torque_impulse" on RigidBody.I trying to use it like this

func _input(event):
    if event.is_action("ui_up"):
        var v3 = -cam.global_transform.basis.z.normalized()
        v3.y = 0
        self.apply_torque_impulse (v3)

but every time i try it it looks like this :

Is function missing or i using it wrong way? Is there any other way how to apply physical rotation to ball-shaped RigidBody ?


Tags :


  • Ace DragonAce Dragon Posts: 74Member
    edited April 16 Answer ✓

    There's a separate function you need to define called _integrate_forces(body), anything that involves forces and impulses must be placed under it.

    To keep the input stuff under the event function, you can simply define the value of a variable (like you have) and use that variable to set the torque impulse.

Sign In or Register to comment.