|
I intend to make a game that takes place in space where one can land a craft on a larger "carrier" type ship, walk around on it, or even drive a little car about the decks. I would like to make a more complete artificial gravity system than just turning on "use gravity" for objects within the ship. The method I am trying to use is to apply a downwards force on any object within a trigger collider. This way, if the carrier does a roll, none of the cargo will fall off into space. the problem is that whether I use "AddForce" or "AddRelativeForce" things on the ship dont seem to behave realistically.
(comments are locked)
|
|
If the ship is permanently fixed upright then gravitytype can be used, otherwise use forcetype where landing on a ship which is upside down you wont end up falling to the ceiling
(comments are locked)
|
|
Use The main diffrences are that this does not take into account the mass of the object - just like gravity doesn't - and the ForceMode.Acceleration will make it behave more like gravity because gravity is an acceleration, not a constant force. Also putting gravity in it's own vector makes it easier to modify
you want to use mothership.transform.up, not Vector3.up
Jan 18 '12 at 02:01 PM
royce3
(comments are locked)
|

Just attach a ConstantForce component on your objects, set the relative force on those to whatever you want them to be, and rotate the objects based on the normal of the surface that they are currently resting on.