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 / [Phsics] Dynamic Object Turning?

Author
Message
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 5th Sep 2010 20:04
I completely forget if i've asked this before, I don't think I have, but I use a dynamic object as my player then add forces to make him move using

And I could not figure out how to make the UP and DOWN keys move the character back and forth where he's FACING. So say he's facing kind of north-west I would want him to move that way using UP and DOWN instead of how I have it where it just moves him along the Z axis.
After I figure out how to do that changing the left and right keys to rotate the player shouldn't be hard at all (I hope)

I want coke, not Pepsi!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 5th Sep 2010 22:52
The GrumpyOne made an improved Character Controller that might work for you. Here is the thread:
http://forum.thegamecreators.com/?m=forum_view&t=172184&b=30

So many games to code.......so little time.
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 6th Sep 2010 02:34
Uh... theres no way to add forces where your facing?

I want coke, not Pepsi!
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 6th Sep 2010 19:01
bump

I want coke, not Pepsi!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Sep 2010 03:03
Dude, I'm working with the same code you are to try and figure this out, as I want the same thing. I'm fairly new to DP, so it is tough to get it right. The idea of bumping a thread is to move it back up to first position so people will see it. With very few posts being put on this board, this is unnecessary and makes you come across as impatient.

So many games to code.......so little time.
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 7th Sep 2010 04:16
I waited till the next day to bump, but anyway any luck with it? I have an idea, like you know how you move along the X and Z axis? and with phy add force objnum,x,y,z,2 (or whatever) why can't we calculate how far we are facing x and z and then add a force that way? I wouldn't now how to begin with that but it's an idea.

I want coke, not Pepsi!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Sep 2010 06:06
Again, continually bumping threads that are already at/near the top of the list demonstrates impatience. I mean, we do have other stuff to do besides coding, you know. Being pushed to solve an issue posted here is not something that I or likely anyone else will enjoy. I am interested in seeing if a solution can be found to this problem, but please don't keep bumping this thread.

The way the modified character controller is made is that when the player jumps, the character controller is deleted and a dynamic rigid body is put in it's place (apparently no one thought that a character controller might want to allow for jumping in a physics-based game )until it collides with another object (i.e. lands on the ground or a platform). Then, the dynamic rigid body is deleted and the character controller is recreated at that location.

Simply adding force to the dynamic rigid body is not as simple as it sounds. If the rigid body gets angled to the side a little bit, and cannot right itself, it tends to hang in the program, or worse, falls over on it's side. Adding force to it to move it in the desired direction complicates matters, and might make it simply spin uncontrollably.

Something else I hope to take a look at is the use of kinematic motion for the rigid body. I have not dealt with this at all and it takes time to learn and evaluate new stuff.

Like I said, I am working with the same code as you are (well, I have made some adjustments to it already). Perhaps you can do some thorough searching of this board to see if someone from the past has done something like this with success.

So many games to code.......so little time.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Sep 2010 09:59
Also when you use physX it acts like the real world, so this force you are trying to do, could this be done for real, if not then physX won't be able to do it.

Only thing that comes to mined is wind, anything else requires an object to do it.

Dark Physics makes any hot drink go cold.
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 7th Sep 2010 21:13 Edited at: 8th Sep 2010 05:57
Quote: "Also when you use physX it acts like the real world, so this force you are trying to do, could this be done for real, if not then physX won't be able to do it.

Only thing that comes to mined is wind, anything else requires an object to do it."


Yes, think about it, we don't only move along the X and Z axis, we can turn and move at any angle we want (except up) and move that way, and thats what I am trying to do with forces. And don't call this a bump LBFN I was replying to somebody...

I want coke, not Pepsi!

Login to post a reply

Server time is: 2024-04-19 19:38:23
Your offset time is: 2024-04-19 19:38:23