A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by FSA » Sun Apr 29, 2012 10:17 am
Hi. I use the CustomKinematicJoint to Pick Objects. That works fine:
- Code: Select all
PickController = CreateCustomKinematicController (PickedBody, JointPos);
CustomKinematicControllerSetPickMode (PickController, 1);
CustomKinematicControllerSetMaxAngularFriction (PickController, 250.0f);
CustomKinematicControllerSetMaxLinearFriction (PickController, 1000.0f);
In my game the player is FirstPerson. So when the player pick an object, he can move it around, that works fine. But if the object collide with a wall from the level, the picked object going to move around and go through the wall. How can i make it that the Object just stop at a wall? I've test it with diffrent values for Linear Friction, but than my object move to much when the player turn around.
Thank you.
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Sun Apr 29, 2012 10:23 am
can you make a video of the problem?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Sun Apr 29, 2012 11:52 am
Yes:
https://www.dropbox.com/s/y3he06fxc8h2yko/Movie.wmvAnd i also don't want that the Object wobble when the Player moving. But if I set the angular an linea velocity higher, the proplem with the wall going to be stronger.
The red text is german, an just saying that the frames to low.
Thank you.
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Sun Apr 29, 2012 12:36 pm
I see. there are few things that I belei you cna solev the all.
few questions.
are you running the physics ate a fix rate?
is so what is you frame rate?
the problem is that the kynematic joint apply very big toque and force to teh body tha is controll so th ait can keep up with the target matrix.
the easiest way to fix that problem is by running at a higeh franme rate. you can try tha as a tes and see if it works.
the next thing is to set contiunue collison on the controlled object so tha the collsion are calculted before the step is taken and the object does no move indide the wall.
there are other things using convex cast to contomize to slwo down the speed of the controlled object, but taht is more complicatedtry the first two see how it works.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Sun Apr 29, 2012 12:51 pm
are you running the physics ate a fix rate?
Yes vertical syncron 60 FPS
the easiest way to fix that problem is by running at a higeh franme rate. you can try tha as a tes and see if it works.
OK but i want vertical sync
the next thing is to set contiunue collison on the controlled object so tha the collsion are calculted before the step is taken and the object does no move indide the wall.
OK i will test it.
Tank you

-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Sun Apr 29, 2012 1:04 pm
you can run teh simulation ar 120, by simple take tow steps of 120 each.
it is no as bad as people think, in fact a physic steps is much faster when run at higher fps.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Sun Apr 29, 2012 1:11 pm
OK with NewtonBodySetContinuousCollisionMode it works. But if the Object is on the wall, an the player walk through the Object, the Object go into the wall. But I think that is the problem i have with dynamic bodies and playerbody

What can I do about it?
Thank you for your patience

-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Sun Apr 29, 2012 1:39 pm
fir the playgoing into teh object you will ned to move to core 300.
ther I am going to make a newer better player.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Sun Apr 29, 2012 1:43 pm
I dont want to rush you, but how long does it take to release of newton 3? And are you going to write a tutorial when the new playerconrtoller is finish? Thank you
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests