Performance question on moving camera with collider.
I have a camera (player camera with occulus VR setup). I've added a rigid body and a box collider and set it to kenimatic and turned off gravity. I move the camera with transform.position and use the box collider to collide with various box colliders in the scene to do things like spin the camera or raise/lower it a few meters. The documentation mentioned that I should move the ridgid body and not rely on transform.position for performance. I want to sqeeze performace out of my app so I'm wondering what a better workflow for this task would be. All I really need is an OncollisionEnter, but it seems to require a rigidbody even though both objects have box colliders and there appear to be no need for physics since I am manually moving the camera setup.
Answer by darkesco · Jan 21, 2017 at 12:31 PM
http://answers.unity3d.com/questions/7671/guidelines-for-using-rigidbody-collider-characterc.html
I found my answer on this very forum. Looks like I was moving the object correctly, except I need to move the code to FixedUpdate.