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 / Character Controller positioning

Author
Message
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 22nd Aug 2010 23:36
Does anyone knows how to place a character controller by specifying the x,y,z coordinates?
Braude Interactive
12
Years of Service
User Offline
Joined: 1st Aug 2006
Location: Sheffield, UK
Posted: 23rd Aug 2010 05:28
it's in the command when you first create it...
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 23rd Aug 2010 10:35
I mean after the creation (I am sorry because I was not clear in my first question)
Braude Interactive
12
Years of Service
User Offline
Joined: 1st Aug 2006
Location: Sheffield, UK
Posted: 23rd Aug 2010 13:57
Dunno how you're 'supposed' to do it, but I just did this with the phy set rigid body linear velocity command.
So like, I wanted it at 10,25,30 (position 2) and it started at 5,45,60 (position 1) so I did position 2 minus position 1 to find out how much it had to move, then set the linear velocities to these values, called phy update, then set the velocities back to 0.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 23rd Aug 2010 17:02
I thought that the phy set rigid body linear velocity command has no effect to a character controller. I'll check...
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Aug 2010 17:49
use the standard one



Dark Physics makes any hot drink go cold.
Braude Interactive
12
Years of Service
User Offline
Joined: 1st Aug 2006
Location: Sheffield, UK
Posted: 24th Aug 2010 00:01
oh sorry... I was having a problem similar to you and I've just given up trying to use the character controller.

I reckon HowDo might be onto something with that one how did we miss a command?
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2010 00:11 Edited at: 24th Aug 2010 00:19
its easy when theres 462 of them for physx.

Dark Physics makes any hot drink go cold.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 24th Aug 2010 10:04
Hi HowDo,
It does not work either this command.
Do I miss something?
All I want to achieve, is make the character controller to work with a moving platform.
When the platform is moving fast along the Y-Axis and the character controller is on the platform then is passing through the platform and falls down.
My approach so far is placing the controller to the same Y-coordinate of the platform. Is there any better approach to this?
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2010 10:34 Edited at: 24th Aug 2010 11:49
you won't like this answer but the character is to big or the standard mass is not heavy enough.

plus how are you moving the platform?


ps
Moraldi are you using 2008 VS or 2010 VS, and how did you get physx to work as I could only part make it go in GDK, been trying to get GDK to work in 2010 but no luck and I am clicking in the dark.

if you are using VS2008
1. Do you know where the download for it is, I keep ending up at VS2010.
2. after I done what it say in the install for GDK what do I do make physx work.
3. text or screen shots of how your set up looks.

no worries if you cannot do this.

Dark Physics makes any hot drink go cold.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 24th Aug 2010 12:04 Edited at: 24th Aug 2010 12:08
Quote: "It does not work either this command."

The code bellow will not move the character controller in its original position:



Quote: "plus how are you moving the platform?"

I use a kinematic actor but I have difficulties, probably because I am not familiar with the physics in general. But this is an independent issue which I could explain later...
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2010 12:43
heres how I do it in basic



only way I could find.

Dark Physics makes any hot drink go cold.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 24th Aug 2010 12:43
And here is my code for moving the platform:



If you run the program you will notice that the platform is not moving due to the fact the function:



is not returning the new position of the the platform.
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2010 12:53 Edited at: 24th Aug 2010 12:55
have you switch the kinematic on like so, I thought it was on as defualt but worth a try.



edit

I see you have , not used to reading C so it takes a bit longer to understand.

Dark Physics makes any hot drink go cold.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 24th Aug 2010 13:07 Edited at: 24th Aug 2010 13:08
I forgot to add the



before the:



Now the code works.
Thank you for the tip about positioning the character controller.
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 24th Aug 2010 13:39
For all those who probably have read this topic here is my tip about moving platforms:



If you will play with different values of speed_x, speed_y and speed_z you will get pretty nice results
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2010 14:11
and for those who would like to see it in basic here you go.



Dark Physics makes any hot drink go cold.
yaten
8
Years of Service
User Offline
Joined: 12th Aug 2010
Location:
Posted: 6th Sep 2010 13:12
Great job sir HowDo and Sir Moraldi, I admire your fluency on both languages ^_^

---
http://www.yaten.me
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Sep 2010 14:23
Yes, thank you. It does work fine and good results can be obtained by playing with the variables.

So many games to code.......so little time.

Login to post a reply

Server time is: 2019-06-16 09:43:46
Your offset time is: 2019-06-16 09:43:46