Convex Raycast Bug [SOLVED]

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Convex Raycast Bug [SOLVED]

Postby pHySiQuE » Mon Jun 05, 2017 1:37 am

It looks like there is still a separate issue, separate from the compound collision problem that was fixed.

The wooden plank is a box or a convex hull shape. It seems whenever it is active there is a lot of inaccuracy in the picked position, and it keeps changing, making the player jump up and down.

https://www.leadwerks.com/files/ConvexRaycast2.zip



Revision 3663. Thanks for looking into this.
Last edited by pHySiQuE on Mon Jun 05, 2017 11:52 am, edited 1 time in total.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Convex Raycast Bug

Postby Julio Jerez » Mon Jun 05, 2017 8:56 am

I do no think that's on the newton side, if you trace the contacts you will see that the have the same value, some how when your code move the player is move to pass the contact.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex Raycast Bug

Postby Julio Jerez » Mon Jun 05, 2017 9:48 am

I just trace the contact point and I am positive the contact are correct,
this is a list of the values as they are produced.

    frame: 9698, t: 0.336561, p(31.222605 1.971633 1.143378) n(-0.043403 0.999058 0.000064)
    frame: 9698, t: 0.336561, p(31.226604 1.971807 1.139366) n(-0.043403 0.999058 0.000064)
    frame: 9698, t: 0.336561, p(31.274572 1.973903 0.959294) n(-0.043403 0.999058 0.000064)
    frame: 9698, t: 0.336561, p(31.226076 1.971807 0.779365) n(-0.043403 0.999058 0.000064)
    frame: 9698, t: 0.336561, p(31.222063 1.971633 0.775364) n(-0.043403 0.999058 0.000064)
    frame: 9699, t: 0.336566, p(31.272232 1.973802 0.950926) n(-0.043403 0.999058 0.000064)
    frame: 9699, t: 0.336566, p(31.267239 1.973585 0.951894) n(-0.043403 0.999058 0.000064)
    frame: 9699, t: 0.336566, p(31.267288 1.973585 0.986320) n(-0.043403 0.999058 0.000064)
    frame: 9699, t: 0.336566, p(31.274487 1.973899 0.959294) n(-0.043403 0.999058 0.000064)
    frame: 9700, t: 0.332729, p(31.270720 1.972854 0.974350) n(-0.043029 0.999074 0.000002)
    frame: 9700, t: 0.332729, p(31.268068 1.972740 0.974354) n(-0.043029 0.999074 0.000002)
    frame: 9700, t: 0.332729, p(31.268068 1.972740 0.984243) n(-0.043029 0.999074 0.000002)
    frame: 9701, t: 0.336488, p(31.222782 1.970789 1.143503) n(-0.043029 0.999074 0.000003)
    frame: 9701, t: 0.336488, p(31.226479 1.970948 1.139806) n(-0.043029 0.999074 0.000003)
    frame: 9701, t: 0.336488, p(31.274700 1.973025 0.959801) n(-0.043029 0.999074 0.000003)
    frame: 9701, t: 0.336488, p(31.226458 1.970948 0.779805) n(-0.043029 0.999074 0.000003)
    frame: 9701, t: 0.336488, p(31.222759 1.970789 0.776107) n(-0.043029 0.999074 0.000003)
    frame: 9702, t: 0.336544, p(31.222784 1.970789 1.143502) n(-0.043029 0.999074 0.000003)
    frame: 9702, t: 0.336544, p(31.226479 1.970948 1.139806) n(-0.043029 0.999074 0.000003)
    frame: 9702, t: 0.336544, p(31.274700 1.973025 0.959801) n(-0.043029 0.999074 0.000003)
    frame: 9702, t: 0.336544, p(31.226458 1.970948 0.779805) n(-0.043029 0.999074 0.000003)
    frame: 9702, t: 0.336544, p(31.222759 1.970789 0.776108) n(-0.043029 0.999074 0.000003)


you can see that the y values change less than one millimeter and that is because the ramp is moving up and down, reaction with the player which is also a dynamic body. the on top of that you teleport that body changing the result of the dynamic calculation by the solver.

this is also another of the reasons I said that you need to use a Kinematic body this way the solve will no change the player but it will take into consideration for the calculation, if you play the newton Playe controller and you walk the bridge, you can his the space key to put object on the bridge, you will see that the bridge react and as the player moves yes it remain stable.

as the Tip Toe ramp is weighted by the box on one side, it wants to go down but you this will move the play as well and you are try to move the player, all of this is what case the problem.

kinematic bodies are the way the newton engine deal with this, they are the glue with the dynamics word but the do not receive movement from the dynamics world.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Convex Raycast Bug

Postby pHySiQuE » Mon Jun 05, 2017 11:07 am

Yeah, you're right. I was able to remove collisions below the player and rely only on the convex raycast, since it is so reliable now. Thanks!
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 14 guests