Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | flonkopaten | |
Old Version | Published before Godot 3 was released. |
I wrote a question related to this question earlier today, but because this is new topic i ask on a new question.
I want to make a simple game with a cube moving arround and colliding with some walls.
the movement behaviour i found was good i made in this script.
func _fixed_process(delta):
if (Input.is_action_pressed("ui_up")):
speed = speed - .5
elif (Input.is_action_pressed("ui_down")):
speed = speed + .5
if (Input.is_action_pressed("ui_left")):
rotate_y(-delta/.8)
elif (Input.is_action_pressed("ui_right")):
rotate_y(delta/.8)
translate(Vector3(0,0,delta*speed))
Very simple!, now the thing is that this dont seem to work well on rigidbody when it comes to colliding. I serached on google but very hard to find tutorials.
On my other question i was told not to use translate, i would use forces for this.
But how? can some one give me a clue or a ready script to afford the same movement by using “forces”.