Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | HahaTheErrorsGoBrr |
I tried to make a cube that moves and rotate when clicked
func _physics_process(delta):
set_axis_velocity(-global_transform.basis.z)
if Input.is_action_pressed("click"):
rotate_y(0.05)
When i started to click and hold my mouse, the object just rotate and not getting affected by gravity nor moving but i want it to fall down and move. But when i released the mouse, the object was be able to fall and move. Is there anyway to make this possible? Sorry for not making this easier to understand, I’m pretty bad at English and this is the best I can get.