Physaxe body that don't react to gravity?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Physaxe body that don't react to gravity?

justin_mills
I have found that if I want to manually move an object's x, y then for
my beginBitmapFill to work I need to _world.sync it, but when I set a
speed no such problem exists.

Anyway my question is can I have bodies that don't react to gravity and
don't collide with other objects.

my current solution for stopping an object moving is in the update loop...

         _world.step(1.0,20);
         _scope.graphics.clear();
         _myBody.y = _initY;
         _world.sync( _myBody );
         var d = new FlashDrawTexture( _scope.graphics );

if I try to use static bodies they don't seem to render with my current
beginBitmapFill, ok just worked out that I need to _world.sync them one
time for the bitmap to be lined up, so they do work now.

Anyway I want to use the engine to draw interactive elements that don't
interact with the other bodies is there a way to do this... any Tips?

Cheers

;j




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Physaxe body that don't react to gravity?

Simon Krajewski
  Am 21.01.2011 12:10, schrieb justin_mills:
> Anyway my question is can I have bodies that don't react to gravity
> and don't collide with other objects.
... so you need a Tweening library? That seems to be what you get when
removing collision detection and gravity from a physics engine.

Simon

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Physaxe body that don't react to gravity?

justin_mills
Le 21/01/2011 12:36, Simon Krajewski a écrit :
>  Am 21.01.2011 12:10, schrieb justin_mills:
>> Anyway my question is can I have bodies that don't react to gravity
>> and don't collide with other objects.
> ... so you need a Tweening library? That seems to be what you get when
> removing collision detection and gravity from a physics engine.
>
> Simon
>
No.  I am using it as a renderer as well, maybe abusing it's design but
for good reason, I have no problem using feffects with a physics
engine.  I will probably need to look at adding blitting now I have
created an overhead of drawing bitmaps.  Maybe simpler to create two
worlds than find a way to turn off gravity and collision for some but
not all bodies, but I think the question was a worthwhile one.

Cheers ;j

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Physaxe body that don't react to gravity?

Pimm Hogeling
I think it would be doable to use a tweening library of some kind, and find a way to hook it up so you can use the physaxe rendering part, without the actual physics part.

On 21 January 2011 13:09, justin_mills <[hidden email]> wrote:
Le 21/01/2011 12:36, Simon Krajewski a écrit :

 Am 21.01.2011 12:10, schrieb justin_mills:
Anyway my question is can I have bodies that don't react to gravity and don't collide with other objects.
... so you need a Tweening library? That seems to be what you get when removing collision detection and gravity from a physics engine.

Simon

No.  I am using it as a renderer as well, maybe abusing it's design but for good reason, I have no problem using feffects with a physics engine.  I will probably need to look at adding blitting now I have created an overhead of drawing bitmaps.  Maybe simpler to create two worlds than find a way to turn off gravity and collision for some but not all bodies, but I think the question was a worthwhile one.

Cheers ;j


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org