TassuP

About

Username
TassuP
Joined
Visits
2
Last Active
Roles
Member
Points
13
2
Badges
Posts
3
  • Can I move a rigidbody with code instead of using a kinematic body?

    Yes, you can use set_linear_velocity instead of move. Works very similarly. Here's an example:
    Kinematic:

    if(Input.is_key_pressed(KEY_RIGHT)):
        move(Vector3(1,0,0)*delta)
    if(Input.is_key_pressed(KEY_LEFT)):
        move(Vector3(-1,0,0)*delta)

    RigidBody in Rigid mode:
    set_linear_velocity(Vector3(0,0,0))
    if(Input.is_key_pressed(KEY_RIGHT)):
        set_linear_velocity(Vector3(1,0,0))
    if(Input.is_key_pressed(KEY_LEFT)):
        set_linear_velocity(Vector3(-1,0,0))