About Store Forum Documentation Contact



Post Reply 
Actors not waking up?
Author Message
fatcoder Offline
Member

Post: #1
Actors not waking up?
I'm not sure if this is a bug or perhaps I'm doing something wrong, but my actors aren't always waking up after they go to sleep (i.e. stop moving for a while).

In my test, I wait for the actor to go to sleep. Once it is asleep, I then set actor.gravity(false) and actor.collision(false). I then move the actor up into the air (just by setting its matrix). Once in the air, I switch gravity and collision back on. However, the actor doesn't wake up straight away, so it will stay up in the air not moving. As soon as I apply a small force to it, it will wake up and drop to the ground.

In order to force the actor to wake up, I need to call actor.active(true) after switching the actor's gravity and collision back on.

I'm not sure if this is a problem with Physx, a bug in EE or if I'm just doing something wrong. Note that this problem doesn't happen every time. Sometimes the actors will wake up correctly and fall to the ground.
12-19-2010 02:23 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Actors not waking up?
Probably it's how PhysX works,
you can just wake it up using Actor::sleep(false)
12-19-2010 02:38 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #3
RE: Actors not waking up?
Can we somehow change how small the force/velocity should be for objects to go to sleep mode? Because I also have this problem with very large objects that should fall over: they stop halfway through.
01-01-2011 11:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Actors not waking up?
sleepEnergy
01-02-2011 01:40 AM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #5
RE: Actors not waking up?
Ah, ty.
(This post was last modified: 01-02-2011 02:16 AM by Masterxilo.)
01-02-2011 02:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply