Physics sleep

Get help using Construct 2

Post » Tue Aug 12, 2014 2:01 pm

An physics object with immovable set to yes can't have sleep value of true?
B
15
S
3
G
3
Posts: 93
Reputation: 1,466

Post » Fri Aug 15, 2014 11:37 am

bump?
B
15
S
3
G
3
Posts: 93
Reputation: 1,466

Post » Fri Aug 15, 2014 11:56 am

If you can explain it a little better, you might get a better answer..

What is a sleep value?
What would you like to do?
What is happening and what did you expect to happen?

With the answers to these questions it would be much easier to help..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 15, 2014 1:07 pm

From manual:
Is sleeping
True if the object has been at rest and not moved or been disturbed for a while, so that the physics engine can stop processing it. Note objects can still be moving imperceptibly which can prevent them from being asleep even when they appear to be stopped.




Is a physics object with Immovable set to yes, always "awake" and taking up resources or is immovable equal to sleep. When I check in the debugger sleep is always set to false on my immovable objects.
B
15
S
3
G
3
Posts: 93
Reputation: 1,466

Post » Fri Aug 15, 2014 1:25 pm

I'm not sure, but I think it isn't that important anyway..
An immovable object doesn't need as much processing as a moving object..
Only collisions with it are important, for it doesn't react to forces anyway..
A sleeping object still reacts to collisions and probably the "is sleeping" will be turned of immediately on collision..
So in a matter of speaking you could say an immovable object is always sleeping, but always awake is actually the same, for the calculations when awake or sleeping should be the same for an immovable object..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, Sup with that? and 69 guests