Hello, i am new to Godot engine and i try to make a simple game with just a cube and a few walls. The cube is my character, and i use this script to make the movement.
func fixedprocess(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 but works just like i want it to.
My problems is when i move this cube into my wall wich is like this :staticbody and the children is meshinstance and collisionshape.
The cube (character) is rigidbody with children meshinstance, collisionshape and a camera.
When move the character into the wall the wall blocks but not totaly, i mean if you still push the button it slowly goes through the wall.
How can i fix this?