Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
|
03-14-2005 02:20
Hi all,
Currently working on a little project which rezzes a scripted non-physics enabled linked prim. I do a few little odds and ends to it, and then the script enables physics. Problem is, that whenever I do so, it appears the object does not detect surface level correctly, and hovers, or bounces about 2 or 3 (scale) inches above whatever surface plane it should be resting on, whether this be true ground or a prim flooring.
Is this a common occurance, or is perhaps my video drivers borked? If I rotate the camera I can clearly see the gap between the object and floor, even if the object is moved, or elevated and then dropped.
Thanks for your thoughts and/or advice. Dominus
|
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
|
03-14-2005 04:12
The problem is that Havok 1's collision tolerance is rather loose - enough to be seen, from the right angles. A physical object can never get closer to another object without triggering a collision, and so it cannot really rest on a surface. Havok 2 supports much tighter tolerances, and should do a pretty good job at fixing this.
|
Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
|
03-14-2005 09:42
Ahhhh thanks!
That does lead rise to the question however, of how much space above the surface I am trying to rez the object on should I leave, in order for it to not detect a collision?
At the moment if I rez it so that it 'sits' on the surface when non-physical, it springs up or sinks as soon as I make the object physics-enabled.
So, for instance were I to wish to rez a physical cup on top of a non-physical table I'd use something like:
llRezObject("teacup",llGetPos()+<0,0,0.5+whatgapneeded>,<0,0,0>,<0,0,0,0>,1);
the .5 in the first vector is the distance from the object centre to its' surface. What should the value for the variable whatgapneeded be, is there a fixed value?
Thanks again, Dominus
|
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
|
03-14-2005 12:10
You would have to measure it I guess. Make the cup physical and set it on the table, and see what its Z is relative to the table Z at rest. You could derive the tolerance from that. Make sure to add a little bit extra on top of that to compensate for rounding errors. I am not sure but I think different prims in different sizes may have different tolerances, due to the way the collision proxies (similar to bounding boxes) are set up.
|