space sleeping and shape->sensor
Posted: Thu Aug 19, 2010 9:24 pm
Hi,
I set my space->sleepTimeThreshold to, say 1 second, and I've got a couple of sensors( 1 body + 1 shape) that I have sitting in one place, and when I pass another (1 body + 1 shape) over it, they don't wake up, or cause a collision. I see that the step checks objects for their kinetic energy before deciding whether to have them sleep or activate, but I'm wondering if there's a way to have the sensors sleep, but also 'look' for collisions? Does that make sense? I'm basically asking if there is a way to have a stationary sensor be woken up by another (moving) body/shape?
Of course, it works when I don't set the sleepTimeThreshold, and everything stays awake. Is there any way to have my cake and eat it too?
Thanks,
Mark
I set my space->sleepTimeThreshold to, say 1 second, and I've got a couple of sensors( 1 body + 1 shape) that I have sitting in one place, and when I pass another (1 body + 1 shape) over it, they don't wake up, or cause a collision. I see that the step checks objects for their kinetic energy before deciding whether to have them sleep or activate, but I'm wondering if there's a way to have the sensors sleep, but also 'look' for collisions? Does that make sense? I'm basically asking if there is a way to have a stationary sensor be woken up by another (moving) body/shape?
Of course, it works when I don't set the sleepTimeThreshold, and everything stays awake. Is there any way to have my cake and eat it too?
Thanks,
Mark