PlayerController-Strange behavior

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

PlayerController-Strange behavior

Postby FSA » Sun Jul 21, 2013 5:55 pm

Hi. I've just updated Newton 5 minutes ago and started the DemoSandbox x64 Version with the Demo Advanced Player Controller. On the video you can see, that the player falls through the floor when a collision occurs with some sort of dynamic Body. And sometimes the player jumps up an get back to the ground abrupt. Is this a bug?
https://www.dropbox.com/s/2lmqmy93af07vof/Bug.avi
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Sun Jul 21, 2013 6:04 pm

yes I was running and experiment to fix a bug and I checked in but mistake.
I will check in the corrected version in a moment

Basically I am trying to replace the second convex cast in the player controller with the more efficient Convex Ray cast.

this is like a ray cast by move a convex shape. and only calculate the contact at first impact, how make faster, and theoretically more accurate, but some how I still have a bug there.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby Julio Jerez » Sun Jul 21, 2013 7:02 pm

It should be good now, I still have no make that change by I will
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Mon Jul 22, 2013 5:35 pm

Nope. Same problem. Nothing changed. :(
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Mon Jul 22, 2013 6:08 pm

really, I just test Basic playe controller, and it seem ok.
I see that intened to climb the small solide on teh floor, but it does not go under ground.

did you synk?
or is that the problem you are refering to?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Tue Jul 23, 2013 8:31 am

Yes i have synked. Everything looks ok with boxes. But with roundly shapes there is the error. I haven't tested the basic player controller. Just the advanced player controller.
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Tue Jul 23, 2013 12:03 pm

Ok I see, there are still some problems there.

I believe I know what it is and I made the modification, but I still have to finish the loose end, I guess I can have ready by tomorrow. I have to leave for work now.

The problem is that the cylinder that I use for supporting he body, generate too many false positive, I think I will replace with a thin capsule.

The second bug is that I can no use that shape for casting the ground because when the play for into a place where the top of the top of the shape hit anything then it report a bad floor.
That what originated the entire changes, and alone the lien I found some bug when casting cylinder.
anyway I believe that now it will be more robust.

the one thing that I am still not sure is whether the play should push small bodies or simple step over them.
Everyone had a different opinion on that.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Wed Jul 24, 2013 7:53 am

Can you just make a boolean, which describes the behavior by small objects? So you can set whether the player should push or walk over it.
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Thu Jul 25, 2013 9:55 am

Ok I think I have good now.

there is still one thing I need to complete, and that is that the new function NewtonConvexRayCast does no report contact when the shape is in penetration at the start of the cast.

basically I wrote that function NewtonConvexRayCast for this player and also some other things, like I will use for the car tire too.
that function is a mix between convex cast and ray cast, basically it is a thick ray cast,
is does no calculate the contact at the collision point just the closest points.

I still have to finish the part when the shape is colliding on the start, but for the most part this function is more robust that the convex cast, because it deal with edge case better that the convex cast.
for example convex ray cast may hit the edge of a ledge of a step, and report that contact, while convex cast will hi that ledge but will not report contact and the player go into a jitter state.

Please see if this is better for you now.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Thu Jul 25, 2013 5:56 pm

Yes it works now :) But... I've found another problem :( The player get stucks in walls or will be pushed outisde the level. See the video:
https://www.dropbox.com/s/cchusszz2au4w0l/IMG_0755.avi

Thank you for your efforts. :D
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Thu Jul 25, 2013 7:28 pm

yes those were the loose end I still need to complete.
The new function does not handle collsion when tow object are on initial penetration. It alway reports zero.
by doing that they is not restoring force and if you force the player then it will eventrauly make iot tru teh wall.
I will fx that tonigh or tomorrow.

this function is much better than before it just need to be completed.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby Julio Jerez » Sun Jul 28, 2013 11:33 am

Ok I believe I fixed all the bugs now. please see if you can break it again.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Sun Jul 28, 2013 5:18 pm

Yaay these bugs are gone. I've just found one in both Player Demos: Colliding with the roof. See the video :wink:
https://www.dropbox.com/s/mftb050xeo0h2bp/IMG_0783.avi
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: PlayerController-Strange behavior

Postby Julio Jerez » Sun Jul 28, 2013 6:59 pm

Upps, yes of course, I forget scanning the up direction.

the play is a kenematic body, kinematics bodies collide with dynamics bodies, but not twith static or other kynematic bodies.

That an eassy fix, I just need to add a third check for the up velocity, when the vertcal compounendt o fteh velocity is positive, and that will solve it.
Thank for that test.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: PlayerController-Strange behavior

Postby FSA » Fri Aug 16, 2013 5:08 pm

I've synched today and found two error's :)
First: No interaction with moving objects as before:
https://www.dropbox.com/s/2lojotugctw5333/IMG_0902.avi

And an old one: The Basic Player does not collide with the roof.
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron