Jump to content

UpdatePhysics vs UpdateWorld


randomkeyhits
 Share

Recommended Posts

This is a query more than anything.

 

As I read the documentation both Script:UpdateWorld() and Script:UpdatePhysics() are both initiated by a single call to World::Update(). In fact the physics is a child of world and is always(?) invoked.

 

So it appears that the separation is more a conceptual one rather than a functional one.

 

The only reason I can think of is by putting all physics in UpdatePhysics then if (I'm not sure) that is invoked first you would know that all physics updates have been applied before you do any other world level checks/logic.

 

So is that it or am I missing something important?

 

I'm feeling rather dense today.

content over form, game play over all.

Link to comment
Share on other sites

UpdateWorld() is called as fast as the PC runs where UpdatePhysics() is called at a constant rate (promises to run x times per second) from what I remember. Which I think would mean if you have a slow PC then UpdatePhysics() might be called multiple times per cycle to catch up.

Link to comment
Share on other sites

  • 1 year later...

Hi all,

so i can resume in:

UpdateWorldHook is called as fast as the PC

UpdatePhysicsHook is called at a constant rate ( promises to run x times per second )

 

 

In my case i see always UpdatePhysicsHook called two times

and UpdateWorldHook only one times per cycle...

 

 

At this point is better to put heavy operations in UpdateWorldHook,

and leave UpdatePhysicsHook calls all physics function calls with their respective variables?!?

I'm not english, so please sorry for my grammatical errors :)

 

I'm using Leadwerks and can programm in C++ and LUA

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