Physics improvement

Everything about development and the OpenMW source code.
User avatar
hircine
Posts: 157
Joined: 06 Aug 2011, 07:18

Re: Physics improvement

Post by hircine »

Morropong!
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Physics improvement

Post by ElderTroll »

Have you sought out advice on the bullet physics help forum? They might know a solution.
User avatar
WeirdSexy
Posts: 611
Joined: 15 Sep 2011, 18:50
Location: USA

Re: Physics improvement

Post by WeirdSexy »

jhooks1 wrote:Anyways here is the video I said I would upload before http://www.youtube.com/watch?v=1TBUrHbS ... e=youtu.be
Physics are off at the beginning of the video, then I turn them on.
Love it. Would you mind telling me how you were moving the camera straight up and down at the beginning of the video?
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Its part of aedra's player movement (pmove) code, so it's only in my physicsaedra2 branch.
User avatar
WeirdSexy
Posts: 611
Joined: 15 Sep 2011, 18:50
Location: USA

Re: Physics improvement

Post by WeirdSexy »

I see, is that something I'd be able to easily download and build, or is it something I wouldn't have access to?

Might be useful for video making, is why I ask.

Keep up the good work with the physics!
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Physics improvement

Post by raevol »

jhooks1 wrote: Anyways here is the video I said I would upload before http://www.youtube.com/watch?v=1TBUrHbS ... e=youtu.be
Teehee. :D I used to do QA professionally, for some value of professionally, so I live for this stuff. :D
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Physics improvement

Post by sirherrbatka »

You still have quite a lot of time jhooks1. :-)
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

jhooks: the up axis is the Z axis.
Try changing in pmove.cpp line 194 to 201:

Code: Select all

endVelocity.y -= pm->ps.gravity * pml.frametime;

// pm->ps->velocity = avg(pm->ps->velocity.z, endVelocity.z)
//pm->ps->velocity[2] = ( pm->ps->velocity[2] + endVelocity[2] ) * 0.5;
pm->ps.velocity.y= (pm->ps.velocity.y + endVelocity.y) * 0.5f;

//primal_velocity[2] = endVelocity[2];
primal_velocity.y = endVelocity.y;
to

Code: Select all

endVelocity.z -= pm->ps.gravity * pml.frametime;
pm->ps.velocity.y= (pm->ps.velocity.z + endVelocity.z) * 0.5f;
primal_velocity.z = endVelocity.z;
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Got the gravity changed to going down, but it still acts like a bouncy ball.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Physics improvement

Post by sirherrbatka »

Maybe tuning parameters like friction can help? At least it's simple and worth a shoot.
Post Reply