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 / Rotations and Movements

Author
Message
fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 3rd Oct 2007 14:05
Hi all,

I wrote a small 'ball rolling around a maze' type simple game (along the lines of marble madness, but with guns! LOL!)

Anyway, I have since purchased Dark Physics and am trying to intergrate these new features.

With regards to the shooting, the code currently rotates the bullets to the required angle, using YROTATE OBJECT and then, when the bullet fires it's purely a MOVE OBJECT.

What is the best way to 'Dark Physics' this simple task? Does Dark Physics override the standard DBPro commands (can I still use YROTATE OBJECT) or do I need to use an equivalent Physics Command?? Is there a simple Dark Physics version of the standard DBPro MOVE as I'm not that hot on vectors?!

Or, would I need to use a local force??

Any help would be great.... Thank you...
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 3rd Oct 2007 23:59
Quote: "Does Dark Physics override the standard DBPro commands (can I still use YROTATE OBJECT) or do I need to use an equivalent Physics Command??"


Once you setup an object as a rigid body, it will not be affected by the usual commands regarding position and rotation. You will have to use the equivalent Dark Physics commands namely Phy set rigid body rotation and Phy set rigid body position.

Alternatively, you may want to setup the object as a rigid body when the player fires, not before. Doing so will let you position and rotate the object using the normal commands, and when ready, set it up as a rigid body.

Quote: "Is there a simple Dark Physics version of the standard DBPro MOVE as I'm not that hot on vectors?!"


Nope. You either use forces or manually calculate the position of the bullet.

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 4th Oct 2007 11:51
Many thanks Kendor.

Changing the object's state to that of a rigid body when it actually fires seems like a great idea... i'll give it a go today.

I know I need to get my head around these vector movements etc but I just wanted to get something working to keep the interest up!! I do tend to lose interest in a project when a new idea comes along (i'm already sketching out the next game and i've nowhere nearly finished this one!)

Thank you for all your help.

Login to post a reply

Server time is: 2024-11-24 21:52:34
Your offset time is: 2024-11-24 21:52:34