Problem with the CustomPlayerController

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Problem with the CustomPlayerController

Postby LukasBanana » Fri Jan 27, 2012 6:17 am

Hi, I'm using Newton SDK 2.16 and I have a problem with the CustomPlayerController.
I followed the Newton Demo (PlayerController) to see how to use and write a class which inherits from the CustomPlayerController.

My problem is this:
Sometimes when I walk with my PlayerController into a gap or acute corners the body transformation goes to infinity (the floats values of X, Y and Z are all INF)
Thus the NewtonBody can no longer be influenced by the physics simulation.

I already tried to change the "SolverModel" to a value of 2, but nothing has changed.

Thanks for your help in advance.
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby Julio Jerez » Fri Jan 27, 2012 10:21 am

Im a glad you are also working on teh palyer controller.
I am working on a new player controller model.

This will be a very diffrent controller. Basically I am moving away form the capsule or cylider style controller, and go with an all body controller.
Bascially the player will be a simplyfied collision vesion of teh skeleton of teh player, when each peacj will be it won controller.
Thsi will resolve tose problem of edge, gaps, and more imprtant teh problem of interating with oteh object.
In the new controller capusle base controller will no work. the will behave like capsule.
this is because each capsule in the player model will do what capsules do, they collide with a perfect round surface.
It will be the combination of all of each capsule or othe shapes represention a boy part, that made the player act more like a human or an organic creature.
this will allow for a simple player solver that solevb simple things, while a higher level manager will will coordinate the solver results.


as for the bug, you are in a very old version you should updata to a newer one.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Problem with the CustomPlayerController

Postby LukasBanana » Fri Jan 27, 2012 1:07 pm

Thank you for the fast reply :) I will update to the latest Newton SDK tomorrow and post the new results here as soon as possible.
I'm creating a first-person shooter, so I think for the first-person PlayerController a CapsuleCollision is good enough and the easiest way.
BTW: for the JointLibrary I cannot find any Wiki or so. It would be very nice if you could add more commentaries in the header files for your next controllers.
Greetings, Lukas
EDIT:
Enother further thing: when I have very small objects in my scene (e.g. a PC-Keyboard Physics Object which can be picked) which lie on the floor and I walk over them I don't want tha stair-step effect.
For those small objects, I just want them to be thrown away when the PlayerController hits them. But the Player should not go over it like with the Stairs-AutoStepping.
How can I do that or will that be supported first with your next Controller?
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby Julio Jerez » Sat Jan 28, 2012 8:23 am

LukasBanana wrote:EDIT:
Enother further thing: when I have very small objects in my scene (e.g. a PC-Keyboard Physics Object which can be picked) which lie on the floor and I walk over them I don't want tha stair-step effect.
For those small objects, I just want them to be thrown away when the PlayerController hits them. But the Player should not go over it like with the Stairs-AutoStepping.
How can I do that or will that be supported first with your next Controller?


that is the point I was talking about, and that I want to resolve with teh new smart controller. an all in one controller can not solve all of the problem of a particular game.

the stair effect, or teh ramp effect are a good, but only when you want that effect, there is not clear way to decide if this action or that other action is teh best respond to a cituation.
so my solution to that is to make a smart player controller.
teh controlley joint will have teh funtionality but it will no try to link or coordnate then.
It will be the new Newtopn AI module tha will coordinate the respond the play will take whne face with the envriment.

also state state machines, pathe finding, navegation, and probability base AI response are commun sugget that every prgrammen is familiar with and therefore they will
be able to extend the funtionality of teh player or any other complex objec like vehicles.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Problem with the CustomPlayerController

Postby LukasBanana » Sat Jan 28, 2012 8:37 am

I updated to the latest newton version and now it seems to be better now but I will make some further tests.
Now I want to add the possibility to "jump" with this player controller. I already tried just using "NewtonBodySetVelocity" but that didn't work.
Can you tell me how to perform that effect?
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby Julio Jerez » Sat Jan 28, 2012 11:11 am

did you move to core 300?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Problem with the CustomPlayerController

Postby LukasBanana » Sat Jan 28, 2012 12:03 pm

What do you mean with "core 300"?
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby Julio Jerez » Sat Jan 28, 2012 12:19 pm

newton 3

it is in forder ../coreLibrary_300
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Problem with the CustomPlayerController

Postby LukasBanana » Sat Jan 28, 2012 12:50 pm

I never re-compiled the Newton Physics Engine but I downloaded the coreLibrary_300 and I will take a look at it. Thanks :D
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby LukasBanana » Mon Jan 30, 2012 3:13 pm

I still don't know how to perform "jumping" with the PlayerController from Newton SDK 2.29 :(
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany

Re: Problem with the CustomPlayerController

Postby Julio Jerez » Mon Jan 30, 2012 4:02 pm

Like I said The player is being chnage to be a smart playe buy it is for core 300. I am working on it now.
you need to move to core 300.
the new player will handle all you want a a lot more. but you have to be patine and uptoday because it is for core 300.
core 200 reved its time.
I am working on the design of eh new player and you strt be funtion in afew days.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Problem with the CustomPlayerController

Postby LukasBanana » Tue Jan 31, 2012 7:31 am

Ok thank you. I think I will wait until the next release - if this will be "Newton SDK 3.00". Until then I will work around the other custom joints to better understand the Newton API :)
My project: SoftPixel Engine
My forum: SoftPixel Forum
User avatar
LukasBanana
 
Posts: 35
Joined: Mon Jul 27, 2009 11:55 am
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests