Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jun 2015 19:24
Hello Forum,

I have a character controller, the code looks like this:


However, it doesn't climb any object that is higher than the player and if i am putting another object underneath the player object it falls down when i am pressing the key to move.

The second problem is that if it does not detect ground underneath it doesn't fall down by itself, only when i am pressing the key to move the player.

Thank You!

More info, i am here.

Alex Matei CEO
www.alexmatei.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jun 2015 00:26 Edited at: 16th Jun 2015 00:28
I'm not familiar with the PhysX plugin so I can't give specific advice. However, this bit of your code looked odd to me:



Is that what you intended?

Edit: removed failed attempt at highlighting text within the snippet.



Powered by Free Banners
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 16th Jun 2015 00:35
Yes it is what i intended. I have a player start with the number 9000

Alex Matei CEO
www.alexmatei.com
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 16th Jun 2015 01:29
yes, but are you intending to take the y position of the camera instead of the object as you do with x and z?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jun 2015 01:52
Quote: "yes, but are you intending to take the y position of the camera instead of the object as you do with x and z?"






Powered by Free Banners
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 17th Jun 2015 11:05
Yes because this is a one time code initilization. I also tested with object's position y (9000) still the same problem.

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 19th Jun 2015 11:23
Any other thoughts regarding the problem?

Thank You!

Alex Matei CEO
www.alexmatei.com
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 20th Jun 2015 16:44 Edited at: 20th Jun 2015 16:55
Quote: "I have a character controller, the code looks like this...However, it doesn't climb any object that is higher than the player and if i am putting another object underneath the player object it falls down when i am pressing the key to move."


Hey MateiSoft, you may have misunderstood some of your character construction parameters.

Your character creation call indicates that the character is not allowed to climb anything higher than 1 unit or slopes higher than a 1.5 degree angle. As you may now understand, these settings are what you might use in a game of Super Bomberman, but I doubt your character will be climbing anything until you set the angle higher to say 45 degrees. Make sure the step limit is high enough to ensure your character can climb the desired height. Let us know if that works.

Quote: "The second problem is that if it does not detect ground underneath it doesn't fall down by itself, only when i am pressing the key to move the player."


I must say that I am no fan of DarkPhysics character controllers; I much prefer the DarkDynamix or DIY solutions; however be sure to call the phy move character controller ObjectID, 0.0 command when no movement is required; this appears to be the DarkPhysics way of updating the character controller.
Good luck

MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 21st Jun 2015 15:00
Yes that worked with the slope limit, thank you. I am trying to understand now if that second problem is because of gravity setup or not i forgot if Dark Physics has gravity or not.

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 21st Jun 2015 18:09
Well apparently phy move object objnum, 0,0 did worked on the falling thing but it has a very low falling speed.

Alex Matei CEO
www.alexmatei.com
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 22nd Jun 2015 13:59
Yeah it has a gravity command: PHY SET GRAVITY

You can find similar functions in the engine section of the command reference .CHM file. Since gravity is a global coefficient, it can should affect the character's falling speed; however Dark Physics does not work well with large units, items seem to move extremely slow even with extremely high values, proportionately you should keep all of your scalar physics values low in your game world small; perhaps with character height of say 1 to 10 units.

MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 22nd Jun 2015 21:26
Well i tried phy set gravity but no result it still falls very very slow though

Alex Matei CEO
www.alexmatei.com
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Jun 2015 23:30
What about the units; how large is the player? Try making the world and the player small enough for the physics system to handle correctly. As I stated in my previous post, things appear to move slow when things are too large for the physics engine. This issue of world scale correlates to the limit of single floating point figures used by DarkPhysics.

MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 30th Jun 2015 15:58
I compared a big object near my player and a small one and it has the same speed sadly ...

Alex Matei CEO
www.alexmatei.com
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Jul 2015 18:30
Consider using another physics plugin like Dark Dynamix or one of the others which you can search for. Dark Physics is really good for rigid bodies and joints; but the other features seem limited.

MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Jul 2015 19:06
Ok, i understand, Thank You for the help!

Alex Matei CEO
www.alexmatei.com

Login to post a reply

Server time is: 2024-04-19 02:55:17
Your offset time is: 2024-04-19 02:55:17