Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | flonkopaten | |
Old Version | Published before Godot 3 was released. |
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 _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 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?
Hi,
I got this problem with my player spawning above the floor, when contact with the floor, player slowly goes through it and stop after fews seconds. Sadly, I don’t remember how i wad fixing that ! You can activate debug collisions and try to check the normals and try to a simple floor test. If you want you can put your project here, I can check.
Nutr1z | 2017-01-10 15:05