
These forums are CLOSED. Please visit the new forums HERE
When does collision fire with avatar? |
|
|
Dazz Anvil
Registered User
Join date: 13 Jan 2007
Posts: 21
|
06-21-2008 15:31
I have an object that fires towards an avatar which has a script that includes the collision event. As I watch the object move towards my avatar, I can see that the collision event is triggered before it actually intersects my avatar. Is the collision event supposed to trigger when the object actually intersects the avatar's mesh, or is there some invisible bounding blob surrounding the avatar that the object crosses to trigger it? Thanks
![]() |
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
06-21-2008 15:47
Almost certainly a bounding box, but I don't know what effect attachments have on the avatar physical representation.
Also note that physical simulation has to use numerical approximation methods with - in SL - a clock <= 45 Hz, so there is some epsilon around that avatar collision domain. |
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
06-22-2008 01:10
I have an object that fires towards an avatar which has a script that includes the collision event. As I watch the object move towards my avatar, I can see that the collision event is triggered before it actually intersects my avatar. Is the collision event supposed to trigger when the object actually intersects the avatar's mesh, or is there some invisible bounding blob surrounding the avatar that the object crosses to trigger it? Thanks ![]() there is a bounding box for all avatars. I forget the measurements, but typically it's larger than what the model shows. I believe using llGetBoundingBox() in an attachment will return your avatar's bounding box. also while it is a box in shape, you can use a cylinder to approximate the box and get near identical results for collisions. _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-22-2008 01:48
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
06-22-2008 04:24
upon collision object is in a position where, on the *next* physics 'tick,' it would have been intersecting. each 'tick,' the object moves its velocity divided by 45. the position you get from llDetectedPos will either be the position at that 'tick' (the one *before* intersection would have occurred), or sometimes it gives you a position from one or more 'ticks' before that
_____________________
![]() |
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
06-22-2008 08:26
Wondering if it might be possible to delay whatever it is you're doing in the collision event for a few ticks until the object moves a bit closer? Or am I on the wrong track.. just a thought.
http://www.secondscripter.com/ _____________________
My tutes
http://www.youtube.com/johanlaurasia |