0
Not a bug

Transport Surface - Issue with "Change Constraints on Enter / Exit"

Luke 2 weeks ago updated by Support 5 days ago 4

I am having difficulty with changing constraints on enter/exit of a transport surface. I get the following errors in runtime. 


NullReferenceException: Object reference not set to an instance of an object
realvirtual.TransportsurfaceCollider.OnCollisionEnter (UnityEngine.Collision other) (at Assets/realvirtual/TransportsurfaceCollider.cs:29)
UnityEngine.Physics:OnSceneContact(PhysicsScene, IntPtr, Int32)

NullReferenceException: Object reference not set to an instance of an object
realvirtual.TransportsurfaceCollider.OnCollisionExit (UnityEngine.Collision other) (at Assets/realvirtual/TransportsurfaceCollider.cs:41)
UnityEngine.Physics:OnSceneContact(PhysicsScene, IntPtr, Int32)

Now for the strange part, the transport surface IS correctly setting the constraint on enter (Freeze position x in my case), but this constraint does not get removed on exit. I do have "Change constraints on exit" set to true and "none" set for the constraints exit. In the "Loaded Part" list in the transport surface, there are no objects listed in runtime even though there are game objects on the transport surface. 


Has anyone else ran into this issue before? Seems weird that I am getting that error on enter, but the constraint is still getting set correctly. 

Under review

Hi we will need to check this tomorrow.

Hi,
I've checked your setup in our current release and I'm not able to get this error.
Which realvirtual release do you use?
The error suggests that the MU lost connection to the transport surface. Are there other colliders nearby?

How is the structure of your MU? Are MU and Rigidbody-component on the same gameObject?

Regards

Christin

I believe that my issue was that I did not have the object set up as a MU. It is working correctly now that I am using a source for the MU's. My apologies.