Answer the question
In order to leave comments, you need to log in
How to implement the movement of a 3D ball through AddForce on Android?
Hello, for about two days now I can not implement the movement of the sphere through AddForce using the UI joystick. I'm making a game for android and I need the sphere to move along the camera's view vector. I don’t know what to do anymore, where to write with the Docks unit, I reviewed this Rigidbody, it seems like nothing helps me (or I didn’t look at it).
6In general, according to my idea, the sphere should move through this:
rb.AddForce(transform.forward * joystick.Vettical * speed,0f,transform.right * joystick.Horizontal * speed);
Answer the question
In order to leave comments, you need to log in
I think it's worth checking whether something other than zero is transmitted when interacting with the joystick.
change axles here
rb.AddForce(transform.forward * joystick.Vettical * speed,0f,transform.right * joystick.Horizontal * speed);
rb.AddForce(_camera.transform.right.x * joystick.Horizontal * speed, 0f, _camera.transform.forward.z * joystick.Vettical * speed)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question