NewtonLockToXY

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonLockToXY

Postby Overhertz » Thu Jul 09, 2009 7:03 pm

hi there,,

i have been told there will be a tutorial for using newton with 2d (but i've read it comes with a performance loss)
i'd love to see a NewtonLockToXY(PNewtonBody) - which would lock a specific body to XY physical simulation, this would be good for making Newton for both 3d and 2d physics.

-Colin
Ziron Programming Language
Download the Assembler HERE
User avatar
Overhertz
 
Posts: 112
Joined: Mon Jul 06, 2009 11:19 am

Re: NewtonLockToXY

Postby Julio Jerez » Thu Jul 09, 2009 7:21 pm

There are several way of making a 2d engine out of a 3d engine, Some do not requeired changes, and other do.
Some are slower and others are faster believe it or not.

The one that is traditionally used with newton users is using a 2d joint, however that one makes the simulation slower since it forces each body in the simulation to have a 3dof joint.
One that is trivial is using a transformation that nullify the third coordinated but is is not very reliable,
The third one which makes the engine twice as fact, is to make the changes to the solver to make trully work in 2d.

When I get to the totorial, I will experimenet with all three and if the the 2D solver option is best I will do that, basically it will be a funtion like
NewtonWorldSet2dPlane (vector planeEquastion)
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonLockToXY

Postby Overhertz » Mon Oct 26, 2009 7:03 am

any news of those tutorials? or much prefered the function i sugested, however i have been thinking around a similar function that would be much better for all 2d and 3d coders, i wrote a 3d engine for simulations, however in some cases, some things in the 3d world need to stick to a certain axis, so rather than a NewtonLockToXY it would be super fantastic to see a NewtonLockAxis([X,Y,Z]);

so for example if there is a clock in a 3d world that needs to run in realtime, but also with destruction or damage properties, ie, nocking the hands out of place, the hands could be locked to their axis, but if the glass/plastic cover was broken completely, they could be unlocked and then they could fall in any direction. if you get my drift :)

i have seen some games also using 2d characters with 3d environments. anyways i hope to see some function like this.

-OHz
Ziron Programming Language
Download the Assembler HERE
User avatar
Overhertz
 
Posts: 112
Joined: Mon Jul 06, 2009 11:19 am

Re: NewtonLockToXY

Postby JernejL » Mon Oct 26, 2009 7:59 am

You could write a 2D slider joint for this.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: NewtonLockToXY

Postby Overhertz » Tue Oct 27, 2009 8:26 am

maybe true, but a simulation with many objects, needs to use as little resources as possible.
Ziron Programming Language
Download the Assembler HERE
User avatar
Overhertz
 
Posts: 112
Joined: Mon Jul 06, 2009 11:19 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests