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 / Omgz teH sp4c3sh1pz!! [Movement help with ships in 0G with DP]

Author
Message
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 2nd Nov 2009 07:11 Edited at: 2nd Nov 2009 07:28
Hi, so i'm doing stuff with my old game and was wondering if anyone could supply me with codes making a box/cube use thrusters for movement??

ALSO, this is for DBP
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 2nd Nov 2009 16:36
Are there thrusters in Dark Physics? Nice

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 2nd Nov 2009 16:46
lol no but i want to make some and i want to find out whats the easiest way to. if i figure it out i'll share teh codez with you kind sir.
Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 2nd Nov 2009 18:54 Edited at: 2nd Nov 2009 19:16
One way you could do it is get the forward vector (the direction) of a box/cube and multiply that by the speed you want to accelerate, then add this to the current position of the object. You can also use this method to simulate inertia.

Here's a little demo I made quick that shows this, its untested as DBP isnt installed at the moment



EDIT: Fixed some errors

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 2nd Nov 2009 21:25
Ty sir , OMGZ nice banner, and game, will you marry me?
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 5th Nov 2009 12:27
I wouldn't use a dymamic body for this. I'd use a kinematic or static object and move it manually. It will still collide with physics bodies but you get to control it. Momentum and velocity would be easy to handle for a spaceship - gravity wouldn't be a factor.


Download the game!

Login to post a reply

Server time is: 2024-11-24 15:03:07
Your offset time is: 2024-11-24 15:03:07