Jump to content

Version 1.0.3 released


Recommended Posts

Hi @calebeaires,


You can set physics world gravity like this:

var world = new game.World();world.gravity.y = -500;

Or you can set it in worlds constructor:

var world = new game.World(0, 500);

Default gravity for world is 0, 980.

Positive y makes bodies fall down.


As the velocity is actually instance of game.Vector, you can use vector functions on it, like:

var world = new game.World();world.velocity.set(0, 500);world.velocity.rotate(0.3);

See more about vector functions in documentation: http://www.pandajs.net/docs/classes/game.Vector.html


Does that help you?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...