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.

Dark Physics & Dark A.I. & Dark Dynamix / [DP] Always point object up?

Author
Message
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Jun 2009 18:10
Hi!
How would I rotate my rigid body upwards, without stopping it from falling?
I want to create my own "Character Controller", because the built-in one is... Not very good in terms of flexibility.
Phy set rigid body rotation does not work, unfortunately...

Thanks!

Jeff



You're the 'th to view this signature!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2009 18:38
Not sure why you think phy rotate does not work as this little demo shows it going, now it could be that you are using it in another way to what I show here, so how are you hoping to use it?

Also the Character Controller is one hard beast to understand, if you download the SDK you might find some code that show how they make it work and how DarkPhysX use it.




Dark Physics makes any hot drink go cold.
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Jun 2009 18:45
While the command itself does as it promises, there is a catch: all the gravity is gone!

That's why I don't want to use it. But I've found another solution, make my own gravity and do this:



Also, why does


return a wrong distance when you walk on a plane? :S



You're the 'th to view this signature!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2009 18:57
Quote: "While the command itself does as it promises, there is a catch: all the gravity is gone!"


That because you are updating it evey loop so the physX system cannot do anything to it.

Quote: "return a wrong distance when you walk on a plane? :S"


what value does it give?

Dark Physics makes any hot drink go cold.
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Jun 2009 19:16
Quote: "what value does it give?"

It differs. Take a look at the attachment, and look at the "Distance to floor: ". (The code for that is in "Includes\_HandleCamera.dba")

Jeff



You're the 'th to view this signature!

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2009 19:53
Got it going after reloading 3d and matrix

Now form what I can see the ground height is the distance of the camera to the center Data/Maps/TestMap.dbo.

so if the camera is pointing down at the ground and you move forward it value would change.

Now it my be that I have not understood what you were after, so if I am getting it wrong I hope you might be able say what I think I should be seeing.


one question, how thick is the ground plane?

Dark Physics makes any hot drink go cold.
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Jun 2009 20:27
Quote: "one question, how thick is the ground plane?"

It's not a plane, it's an box made in 3D World studio.
But I got it going by changing the ray cast command into PHY RAY CAST ALL SHAPES.
Thanks anyway

Jeff



You're the 'th to view this signature!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2009 20:33
Well done, as you are finding out, try all commands in the set to see if one does it better than the others.

Plus if you get a chance download the SDK, and if you can read c++ then you will be able to see how some of the physX command work, this how I got the pulley commands to work, and what is go in with the Character Controller.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-11-24 16:28:01
Your offset time is: 2024-11-24 16:28:01