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 / Autoleveling with(out) physics? Can some smart genius like you help me please?

Author
Message
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 11th Apr 2007 09:53
Hey I've been away from my code for a while, but finally getting back at it all. Wah hoo, I love physics hehheh. (Actual question is quite a way below =) One day years ago now I remember saying to my wife something like, "Man, if only someone could just make a real useful library to make coding the physics of my game the easy part so I could go on with making the game fun to play, well that would just RULE!" she probably said something like "is that the hard math stuff you've been plugging away at honey?" Actually that doesn't give her enough credit really for how smart she is, I have no clue what she said probably because I was already Googling hard =). Well low and behold by dinner time that night I was cruising off jumps in an AMAZINGLY well simulated stunt car game of my own design and gawking and drooling over how sweet it felt to bash into piles of crates I had set up and roll that baby! Hehheh, yeah ok, I guess I must be white and nerdy, but COME ON! Good physics make a good game ROCK! Anyhow, that night I remember feeling like I was set free to get back to what I like the most about programming, making a 3D world come to life rather than banging my head against the wall when it comes to complex maths. And since then Dark Physics really raised the bar for performance and realism, and well, just plain made programming fun again. Way to go TGC, I'm so glad you released DarkPhysics, it's a blast. (They don't pay me to say that I promise!)

Ok ok, well here I am with the question finally hehheh. I hope no one minds my raving about a great fun programming tool. Uhm my boxes all bounce around beautifully and everything, but wouldn't you know it I'm back to banging my head against the wall with something that just seems like it should be really simple to do, but I don't remember (or um .... I guess I don't know) how to do it. What I want to figure out how to do is AUTO-LEVEL something, with interpolation. It seems like it should be easy, and honestly it seems like I've done stuff like this before, but I can't figure it out today/tonight/this morning.

Picture a ... well lets just call it a flying saucer (It's something else entirely, but I don't want to spoil the suprise yet do I? =). You can control it by pitching it forward or backward, left or right. But I want it to slowly right itself (so the game is still fun for the non-die hard). So say you banked your 'saucer' right and pitched it's nose down 10degrees. And as a result it's also yaw'd 15 degrees to the right. How can I figure out what I want my target angles to be? I can slerp em slowly myself, but I want the final result to be a flat saucer again with just the 15 degree turn to the right (I'll smooth it all out myself and make it look real too by going past it etc. etc.). Maybe (er probably) I'm trying to overcomplicate this and it's real simple, but those negative euler angles always throw me off.

Maybe I could just stick a dummy object on it that always stays flat and only takes on the yaw/turn/direction 0-359? And grab the slerp target from that? I've done a lot of things like that before, and I guess I'll go try messing with that now that I -just- thought of it hehheh. But my head is starting to hurt, this is the third day of thinking about this one (between the kids and everything else - it's 239am and baby just woke up and needs a 'baba' . . . so I guess I should end this long winded post now. =) If anyone could please give some suggestions or code snippet, well I reckon I'd be downright grateful and appreciative!

I'll try not to solve it in the next couple hours to give you guys a shot at it. All kidding and raving aside, I'd really appreciate some help. Thanks folks.

Best sleepy regards,
-=VRMan=-
www.vrman3d.com (yeah I know the site's down right now - but it'll be back again soon)

World Famous 3D Screensavers
-- http://www.vrman3d.com --
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Apr 2007 15:40
EzRotate has some cool really nice commands to do this. You can get things to slowly turn towards another plain in all sorts of ways:

EZro_RotateTo
EZro_TurnPitchTo
EZro_turnTo
EZro_PitchTo
EZro_RotateSurfToSurf

Well worth the small investment in terms of the time and hedaches it will save.
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 12th Apr 2007 02:30
Ok BatVink thanks for the suggestion, yeah I've ....almost..... bought EZrotate like 10 times, and I always manage to figure a way of doing what I need just before buying it hehheh. But you're probably right I should just buy the handy library and get back to the fun coding again.

Thanks for your time man.

World Famous 3D Screensavers
-- http://www.vrman3d.com --

Login to post a reply

Server time is: 2024-03-29 15:21:02
Your offset time is: 2024-03-29 15:21:02