New answers tagged

1

First of all, game engines and math go hand in hand so understanding the underlying theory should be high in your priority list. I will try to explain this at a high level, based on what I understood and will try to elaborate later when I get the time. I will also put in bold terms you should look at. Taking the spiderman swinging example, this means you ...


4

Gimbal lock occurs when your internal structure for storing/composing rotations uses a gimbal model: Image via Wikipedia, attributed: "By Lookang many thanks to Fu-Kwun Hwang and author of Easy Java Simulation = Francisco Esquembre - Own work, CC BY-SA 3.0" That is, when you construct your orientation as a sequence of component rotations with ...


1

The Z you are assigning is taken as the distance of the point along the ray produced in the viewport; which corresponds to all the world points stacked on that screen point. The higher the Z, the farther it is from the camera. That being said, based on the information you provided, I suspect you want to use ScreenPointToRay here, perform a raycast, then ...


1

If you want to limit the speed with which your gameObject is allowed to rotate, then the Methods Vector3.RotateTowards or Quaternion.RotateTowards can help you. They can be used to turn an object towards the desired direction, but put a limit on how far the object is allowed to turn by specifying a maxDegreeDelta parameter. Vector3 current = transform....


Top 50 recent answers are included