I really need someone to hold my hand with this one
and treat me like a beginner. The online instructions and
youtube videos aren't working.
So I have a kinetic body 3d, it's basically just the
floor of my game. I want to simply add either the
accelerometer or gyroscope ( not sure what one to use )
to the floor so when I tilt my phone the floor will tilt in the
same direction.
My current code:
var rotationn = Vector3(0,0,0)
const SPEED = 6
func _process(delta):
var rotationn = Input.get_gyroscope()
move_and_slide(vector3(rotationn.y, 0, rotationn.x) *
SPEED, Vector3.ZERO)
pass
The platform will move back and forth depending on the
direction my phone is tilted in but it doesn't tilt, it just moves
in the direction I am tilting and slides across the screen, I want the floor to actually tilt
and I want the floor to remain stationary, I want it to stay
where it is but tilt in the direction my phone is tilting in.
Thanks, I hope I was clear enough. My code is probably completely
wrong, it was just the closest I could get for it to perform the task
I wanted it to do.