Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by MeltingPlastic » Fri Mar 01, 2019 1:39 pm
Hi Julio,
I am trying out the kinematic bodies for the first time. I'm having trouble getting the body wake the surrounding bodies.
Do I have to manually wake bodies in the AABB of the Kinematic Body?
Here is a video:
https://youtu.be/EWSuV2CnYbs
Last edited by
MeltingPlastic on Tue Mar 05, 2019 8:31 pm, edited 1 time in total.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Julio Jerez » Fri Mar 01, 2019 4:54 pm
There is an option for that, I do no remember now and I can open the SDK from were I am now, I check out tonight.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by MeltingPlastic » Fri Mar 01, 2019 5:12 pm
Thanks, I did try waking the bodies manually using a the NewtonWorldForEachBodyInAABBDo callback. But That did not seem to keep the bodies awake.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Julio Jerez » Fri Mar 01, 2019 8:04 pm
Let see if I understand the video.
You have a platform, that you are rotating.
And some objects are dealing on it.
Is the platform the kinematic body?
I see some objects calling with it.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by MeltingPlastic » Fri Mar 01, 2019 8:12 pm
Yes the platform is the kinematic body and all other bodies are normal dynamic bodies.
all the dynamic bodies should be rotating on the platform as well as being pushed to the side if they are not on the platform. but it only seems to happen on some bodies and intermittently on others.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Dave Gravel » Fri Mar 01, 2019 9:08 pm
Hi MeltingPlastic, It don't fix the problem but do you have try to disable the auto sleep on all bodies ?
Just for see if it work ok without the sleep.
From what I see in the video only the dynamic bodies wake up the other bodies.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by MeltingPlastic » Fri Mar 01, 2019 9:26 pm
Hi Dave,
Just tried that and (although all the bodies are now always awake) sometimes they do not collide with the platform.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Dave Gravel » Fri Mar 01, 2019 9:45 pm
I don't have test the kinematic body.
I remember to have already make a old demo flying carpet with normal dynamics body.
From what I remember it working good only when the body is updated at the physics time process.
https://sites.google.com/site/evadlevar ... t_7_3b.zipI need to test it with kinematic body, Thanks for the info.
Edited: Oh I just have see the newton sdk demo now I really need to test, It is totally different from what I have use in my old demo
hehe
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by Dave Gravel » Sat Mar 02, 2019 12:03 am
I wonder if it can become more simple to use a joint dCustomKinematicController and update the matrix syncro with newton step update ?
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by MeltingPlastic » Sat Mar 02, 2019 10:55 am
I agree the dCustomKinematicController joint could work well in alot of situations (including this one).
I'm hoping to get "1way" kinematic bodies working though for feature completeness.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Julio Jerez » Sat Mar 02, 2019 11:23 am
Maybe I am missing something.
I see if today I can add a kinematic demo like the one you show,
Them we can test all the functionslity.
Tell me this.
Are you moving the kinematic in a call back from a newton update?
How are you moving it.
Are you going them velocity?
kinematic object can be really powerful when use properly, but there has not been too many demos how the work.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by MeltingPlastic » Sat Mar 02, 2019 11:39 am
I am not using any callbacks, I call NewtonBodySetAngularVelocity() when the newton update is finished. And then a NewtonBodySetMatrix().
Edit: correct above for the order that I am calling the functions
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
by Dave Gravel » Sat Mar 02, 2019 1:05 pm
What I don't understand here is about the NewtonCreateKinematicBody, Is it supposed to generate collision ?
When I try to create a KinematicBody I get only a body with yellow debug line without collision response.
I create the body like this.
mBody := NewtonCreateKinematicBody(nWorld, mNewtonCollision, @newMatx.V[0].V[0]);
NewtonBodySetCollidable(mBody, 1);
I need to cast the shape and add collision points by hand similar to player controller ?
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by MeltingPlastic » Sat Mar 02, 2019 1:57 pm
From what I understand you first Create a Kinematic Body Just like you would create any other body - and then attach a collision to it as is normal.
The only difference is that you can directly set the body's velocity (and possibly acceleration?) - But the Kinematic Body will never actually move as a result of that velocity - It will just move any normal bodies that are in contact with it. to get the kinematic body to actually move you have to update its global matrix.
-
MeltingPlastic
-
- Posts: 237
- Joined: Fri Feb 07, 2014 11:30 pm
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 3 guests