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 / Overhead Spaceship Game - How to move the ships?

Author
Message
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 10th Jan 2008 03:49
Basically, the project is an RTS. The units are all spaceships, so I thought controlling them would be really easy. However, I can't find a command that works for turning them.

Here's the code I'm working with right now. The moving forward and backwards works fine, but when I try to turn the ships all they do is spin around, still travelling in the same direction. Is there a command that can actually change the direction the object moves in, or do I have to calculate out the force to send the ship in the proper direction?

Gravity is set to 0, by the way




[i]"Grow food in dirt? Save time — eat dirt."[i]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Jan 2008 13:01
You can't mix standard DB Pro movement and Dark Physics movement, it just doesn't work.

Use the phy set rigid body angular momentum/velocity commands to rotate, or phy set rigid body rotation to simply set a specific angle.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 10th Jan 2008 15:33 Edited at: 10th Jan 2008 15:48
Ok, thanks. Actually I was using PHY ADD RIGID BODY LOCAL TORQUE before, I'll try those ones.

Edit: Those commands all do the exact same thing as PHY ADD RIGID BODY LOCAL TORQUE (at least for what I'm doing). The make the object rotate but don't change the direction it travels.

I think the only way to do that is probably to calculate out the force and send the ship in the right direction that way.


[i]"Grow food in dirt? Save time — eat dirt."[i]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Jan 2008 16:48
If you rotate an object, it will still travel in the same direction (Think games like asteroids and Joust). You will only start to change direction if there is more linear force applied in the new direction. Then, you won't change immediately, it will be a gradual change.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 11th Jan 2008 00:54
Ok, thanks, thats exactly what I wanted to know.


[i]"Grow food in dirt? Save time — eat dirt."[i]

Login to post a reply

Server time is: 2024-05-20 00:49:14
Your offset time is: 2024-05-20 00:49:14