using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Physics * @{ */ /// Contains data about a collision between two character controllers. [StructLayout(LayoutKind.Sequential), SerializeObject] public partial struct ControllerControllerCollision { /// /// Returns a subset of this struct. This subset usually contains common fields shared with another struct. /// public ControllerCollision GetBase() { ControllerCollision value; value.position = position; value.normal = normal; value.motionDir = motionDir; value.motionAmount = motionAmount; return value; } /// /// Assigns values to a subset of fields of this struct. This subset usually contains common field shared with /// another struct. /// public void SetBase(ControllerCollision value) { position = value.position; normal = value.normal; motionDir = value.motionDir; motionAmount = value.motionAmount; } /// /// Component of the controller that was touched. Can be null if the controller has no component parent, in which case /// check #controllerRaw. /// public CharacterController controller; /// Contact position. public Vector3 position; /// Contact normal. public Vector3 normal; /// Direction of motion after the hit. public Vector3 motionDir; /// Magnitude of motion after the hit. public float motionAmount; } /** @} */ }