View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:38 pm



Reply to topic  [ 1 post ] 
 Raycasting and MO adding weirdness 
Author Message
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Raycasting and MO adding weirdness
So, you can use SceneManager functions to cast rays to find stuff, which you probably knew. But their functionality seems a bit strange at times.

A major thing: the description for CastMORay says that if terrain or no MO is found, then something called g_NoMOID is returned instead of an MOID. In practice, though, you seem to get back the number 255. I find this a bit odd, since it seems like this assumes there will always be less than 255 MOs around. Sure, maybe 254 MOs would be hideously laggy, but... Furthermore, it seems that when you add a new object using the MovableManager add functions, it gets an ID of 255. This seems like it could throw things off a bit, were you to want to create a new object through Lua and then cast some rays around it.

So I feel like there's some error here, but I'm not sure if its the fact that ray casting returns 255 (and I don't know if this is the numeric value of g_NoMOID or what) or if its the fact that adding an object gives that object an ID of 255, rather than the lowest ID currently available, which is the way I would expect it to work.


Wed Jun 03, 2009 12:57 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.060s | 15 Queries | GZIP : Off ]