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 / Any profficient Physics coders out there?

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Sep 2006 01:48 Edited at: 5th Sep 2006 20:19
Hi, having just started out with this, I was wondering if anyone who has used this for any length of time, could point me in the right direction.

I am trying to make a sphere that I can manouvere around aka marble madness. I have had very limited success so far. Character controllers seem to be box or capsule? I'm not sure if I can use one of those or just attempt to move a sphere with the velocity command. This is what I have done so far, works sort of... Until you start bouncing off things..



Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Sep 2006 06:11 Edited at: 5th Sep 2006 06:12
why have you done object one twice. You've loaded it in, given it phy boundary then you have done it again when you tried to rotate it on screen, this should be done first before phy command call.

eg


plus you may find it better if you use box instead of mesh

Dark Physics makes any hot drink go cold.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Sep 2006 11:00
Ahh, that's leftover from my earlier tweakings. Sorry about that. It was getting a bit late when I posted. It is mainly the ball control I am interested in. The wall object is actually a complete wall around the scene and not just a long wall. I will probably change it, that was just a quick test. The problem I have with the control is as soon as the ball bounces off anything, my directional control goes all to hell.
I have included the media and code here, in case it's putting people off looking. I'll amend the code later today, as I'm off to work now.

Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Sep 2006 15:08 Edited at: 5th Sep 2006 15:10
I think I have work out what I think may be wrong, when the object bounces against the wall or other object you need to reset inertiaforward# and inertiasideward# back to zero.


add this line to your code just above phy update and you will see what I mean.



Dark Physics makes any hot drink go cold.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Sep 2006 20:18
Yeah I figured it was down to the additional forces from the bounce causing the problem. Not sure if there are any commands that will give you the current velocity. If so, might be able to combine these to work properly. Off to have a look...

Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 6th Sep 2006 06:35
there this little group that might help



Dark Physics makes any hot drink go cold.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Sep 2006 18:16
Finally figured it out last night. I wasn't too far off with the first code. I'll put it up later. Works really well.

Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Sep 2006 22:05 Edited at: 6th Sep 2006 22:30
Ok, here's the working code. Added a shadow for the ball too. Slightly buggy, but not sure why (on the shadow). You may have to tweak the settings a little on different speed cpu's, but it should work straight off pretty well. Obviously, ignore the media, although most is provided up above. The tube object I added in to see how it handled it. Basically a 3ds tube, sliced up to just a half tube, it worked perfectly .



Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Sep 2006 06:03
DVader nice one when you get the last little bit sorted put it in code snippet for all to see and an exe for thoese that don't have it yet.

Dark Physics makes any hot drink go cold.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Sep 2006 14:22
Howdo, I will, the only problem with it is with the shadow shading command. Nothing to do with the physics of it. I was just tarting it up a bit . As I know little about using shaders,not sure how I can alter it. I have gone into the fx file and altered the 0.1 value that the help reccomends but cannot see any difference at all on screen, I guess I am doing something wrong there. I aso have another odd problem with another test object I tried yesterday. So far not much feedback on that one(see my other thread odd problems).

Check out Project Desert Storm

http://forum.thegamecreators.com/?m=forum_view&t=83458&b=8

Login to post a reply

Server time is: 2024-03-28 12:30:29
Your offset time is: 2024-03-28 12:30:29