Data Realms Fan Forums http://45.55.195.193/ |
|
Raycasting and MO adding weirdness http://45.55.195.193/viewtopic.php?f=73&t=15148 |
Page 1 of 1 |
Author: | Darlos9D [ Wed Jun 03, 2009 12:57 am ] |
Post subject: | 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. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |