Collision with two parts of the same body

edited January 2012 in Help request
If my object has two parts, is it possible to handle collision differently if it hits one part or another?

For instance, if the middle of the object is vulnerable to attack, but being hit anywhere else accumulates your score, is it possible to check for which of the two parts got hit and act accordingly?

Comments

  • edited January 2012
    Yes, you can acces this info: the part names are provided in the event payload.
    typedef struct __orxPHYSICS_EVENT_PAYLOAD_t
    {
      orxVECTOR       vPosition;              /**< Contact position : 12 */
      orxVECTOR       vNormal;                /**< Contact normal : 24 */
      const orxSTRING zSenderPartName;        /**< Sender part name : 28 */
      const orxSTRING zRecipientPartName;     /**< Recipient part name : 32 */
    
    } orxPHYSICS_EVENT_PAYLOAD;
    
Sign In or Register to comment.