Jump to content

SetGravity does not work anymore


Slastraf
 Share

Recommended Posts

SetGravity: http://www.leadwerks.com/werkspace/page/documentation/_/world/setgravity-r829

 

This does not work for me when i put this in the app.lua like this:

 

--Create a world

self.world=World:Create()

self.world:SetLightQuality((System:GetProperty("lightquality","1")))

self.world:SetGravity(21, 233, 25);

 

--Load a map

...

 

I already tried it on an earlier version some time ago and this worked just fine, but not at the moment.

im using 3.5 beta

Link to comment
Share on other sites

If you set the world gravity after you load the map, it will work. A map will set a gravity value from Scene's Root property panel and effectively over-write your setting. Keep in mind a positive value for the Y-component will cause objects with mass to move up. The Y-value shown in the editor for gravity is actually a negative value.

  • Upvote 3

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

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.

Guest
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.

 Share

×
×
  • Create New...