The problem is that when I try to check the group of the returned by the raycast object, it always returns 1 (for GROUP_1_LEVEL - see below).
Somehow it`s not recognising the groups of the other Rigids. Their groups are assigned properly in their create events for sure.
First of all I create some PhysX collision groups, `cause I find it useful:
Code: Select all
enum COLLISION_GROUPS
{
GROUP_0_NOCOLLISION,
GROUP_1_LEVEL,
GROUP_2_CHARACTER,
GROUP_3_OBJECTS //group for checking shootable objects
};Than I create my Raycast like this:
Code: Select all
{
NxShape* shape = Scene->raycastClosestShape(
worldRay,
NX_ALL_SHAPES,
hit,
GROUP_2_CHARACTER,
defdist);
}
// since the origin of the raycast is in the character`s collision volume
// I ignore it to avoid commiting a suicide =)
I did my best to arrange the code, because by simply pasting here makes a mess, and tried to focus on the problematic function. The problem may be somewhere otside, so if you wanna know sth in particular, feel free to ask.
EDIT: I moved the topic from the Beginners section[/code]