justnajm / physaxe

Automatically exported from code.google.com/p/physaxe
0 stars 0 forks source link

waking up a sleeping island causes body to fall thru floor #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. move with the arrow keys, space sets velocity to zero
2. let the circle fall a sleep
3. press right arrow, I set body.island.sleeping=true so I could adjust the
velocity again, but it falls thru the floor in the process

What is the expected output? What do you see instead?

The idea of idle parts of the world falling asleep is a great optimization,
but when I try to programaticly it up, the model seems to get confused.

What version of the product are you using? On what operating system?

I'm using haxe 2.01, compiling to flash 9 on Linux.

Please provide any additional information below.

Here is how I tried to wake up the island:

 if ( bob.island.sleeping ) {
    bob.island.sleeping = false;
    bob.v.y--;
 }

I tried to pop bob up a bit, but it didn't help.

Sometimes to make it fall asleep, I used SHIFT + arrows (moves
flash.Lib.current.x and flash.Lib.current.y)

I expect I may not be using the library correctly.

Original issue reported on code.google.com by briani...@gmail.com on 1 Dec 2008 at 10:59

Attachments:

GoogleCodeExporter commented 9 years ago
I was able to work around it by making the "wakeup hop" 5 which seems to give 
the
island time to wake up.

Original comment by briani...@gmail.com on 1 Dec 2008 at 11:02

GoogleCodeExporter commented 9 years ago
To wakeup a sleeping body, you will have to call world.activate(body);

Original comment by ncanna...@gmail.com on 5 Feb 2009 at 3:28