FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Gravity in SIO2?

3 posters

Go down

Gravity in SIO2? Empty Gravity in SIO2?

Post  CadetCrusher Wed Oct 07, 2009 1:49 pm

I'm a super noob to SIO2 so this may be in the wrong section, but here's my question: Can you set the value of gravity in Blender/SIO2? More specifically, I'm making a game with a ship that you fly around in outer space. But as I'm finding out you can't use the setLinearVelocity() on a static object. The problem is when I set the player object (the ship) to be a dynamic object it starts falling towards the "ground". Is there a way to set gravity to 0? What would you suggest?

Thanks!

CadetCrusher

Posts : 21
Join date : 2009-10-07

Back to top Go down

Gravity in SIO2? Empty Re: Gravity in SIO2?

Post  sio2interactive Wed Oct 07, 2009 1:59 pm

Yes, but you'll have to do it in code... check tutorial061 for an example of how to set the gravity...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Gravity in SIO2? Empty Re: Gravity in SIO2?

Post  Francescu Wed Oct 07, 2009 1:59 pm

Check tutorial06 source code for example...

EAGLview.mm

Code:

      // Set the gravity of the physic world, to
      // something similar as earth. Please take note
      // that the default up vector of SIO2 is the positive
      // Z axis. So gravity should go down on the negative
      // Z axis.
      sio2PhysicSetGravity( sio2->_SIO2physic, &gravity );   

Francescu

Posts : 136
Join date : 2009-03-18

Back to top Go down

Gravity in SIO2? Empty Re: Gravity in SIO2?

Post  CadetCrusher Wed Oct 07, 2009 2:03 pm

Cool! Thanks! That was fast.

CadetCrusher

Posts : 21
Join date : 2009-10-07

Back to top Go down

Gravity in SIO2? Empty Re: Gravity in SIO2?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum