Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


physicscallbacks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
physicscallbacks [2021/02/22 16:35]
73.95.178.156
physicscallbacks [2021/04/28 01:37] (current)
73.95.178.156
Line 1: Line 1:
 ====== Physics Callbacks ====== ====== Physics Callbacks ======
 +
 +===== OnTriggerEnter =====
 +  * Will be called for all collisions for all trigger colliders on this Rigidbody.
 +  * There is no way to get a reference to 'this' trigger collider that was entered.((https://gamedev.stackexchange.com/a/185095/1669))
 +
  
 ===== OnTriggerExit ===== ===== OnTriggerExit =====
Line 5: Line 10:
   * Is not called if the Rigidbody/Collider is recreated internally((Such as when a collider is moved to a new Rigidbody)).<sup>[//[[:wiki:tag:research-needed|research needed]]//]</sup>   * Is not called if the Rigidbody/Collider is recreated internally((Such as when a collider is moved to a new Rigidbody)).<sup>[//[[:wiki:tag:research-needed|research needed]]//]</sup>
   * Is not called if the trigger is disabled.   * Is not called if the trigger is disabled.
 +
 +===== OnCollisionEnter =====
 +  * The OnCollisionEnter callback event must be attached to the GameObject with the Rigidbody you want to listen to. ((ie. this event will not fire if it is attached to a child collider))
  
 ===== OnCollisionExit ===== ===== OnCollisionExit =====
physicscallbacks.1614011753.txt.gz · Last modified: 2021/02/22 16:35 by 73.95.178.156 · Currently locked by: 101.44.248.200