Game Development Community

Quick rayCast question

by Spencer Strombotne · in General Discussion · 09/22/2008 (12:58 pm) · 5 replies

I have the line:

%scanTarg = ContainerRayCast(%muzPoint, %rangeEnd, %searchMasks, %notIncluding);

and I have one specific object that is a staticshape that I want to exlude from the search. What would I put in the %notIncluding that would exlude the player and the object?

#1
09/22/2008 (4:04 pm)
Could you use the mask to exclude the player? I think the player has its own object-type. Then use the objectid of the TSStatic for %notIncluding.
#2
09/22/2008 (4:29 pm)
That would miss any other Player or AIPlayer objects as well tho, which is maybe fine.

you could try moving the object far away, doing the cast, then moving it back.
#3
09/22/2008 (4:29 pm)
How about %notIncluding = %object | %player;
Where %object is the staticShape, and %player is (obviously) the player?
#4
09/22/2008 (4:30 pm)
That won't work, %notIncluding should be an objectId, doing bit operations on objectid's wouldn't make any sense.
#5
09/22/2008 (4:36 pm)
Ah, I thought %notIncluding was a mask, hehe. You're right, only one object ID can be passed as exempt. Maybe you could move the start of the rayCast a few units forward to avoid hitting the player casting it, and exempt'ing on the staticShape?