SP3 Motor Boat sample.
-
This includes new features buoyancy, magnets and keyboard control. It also features a old bugfix/new feature. You can group two joints together to make a composite joint (hinge+slider=corkscrew).
Here I was trying to make a motor boat, something that wasnt possible in sp2. The trick is to get something to thrust the boat through the water. Propellers wont work because there isn't any fluid.
So I connected a sphere to my boat object by grouping a slider and a servo. Connected the slider to the sphere and the servo to the boat. Now I can steer the sphere.
To add the thrust I made the sphere magnetic and the boat a magnet. Set the strength of the magnet based on the controller "righty" i.e UP/DOWN on keyboard.
So the sphere tries to catch up to the magnetic boat and pushes itself forward because it is connected to the boat by the gears. A perfect example of something that is completely Impossible in real life but works great in SP.
But it still doesnt work very well because there is no fluid to try to keep the boat following its keel. It might work better as a zero gravity thruster....
-
looks good, but wouldn't it be good if someone could devise a simple form water like in computer games or something so that you could have like a propeller or something or at least maybe a thruster motor as a choice of moor?
-
It seems something like "linear aerodynamics" should be manageable.
Lift = lift_constantangle_of_attackvelocitywing_area, in direction perpendicular to velocity
Drag = drag_constantangle_of_attackvelocitywing_area, acts in direction parallel to velocity.Lift_constant and drag_constant should be functions of angle of attack, for example if Lift_constant goes to zero at some maximum angle of attack it will represent stalling of the wing.
This is somewhat similar to a magnet whose force depends on velocity of the object, instead of the distance to another object...I guess I need to peek at the magnet code.
Kirk
-
@kprice said:
It seems something like "linear aerodynamics" should be manageable.
Lift = lift_constantangle_of_attackvelocitywing_area, in direction perpendicular to velocity
Drag = drag_constantangle_of_attackvelocitywing_area, acts in direction parallel to velocity.Lift_constant and drag_constant should be functions of angle of attack, for example if Lift_constant goes to zero at some maximum angle of attack it will represent stalling of the wing.
This is somewhat similar to a magnet whose force depends on velocity of the object, instead of the distance to another object...I guess I need to peek at the magnet code.
Kirk
You sound like you know what you are talking about... It went over my head.
dVector delta = body->location - magnet->location; dVector dir = delta.normalize(); dVector force = dir.Scale(body->mass * magnet->strength / delta.squaredLength()); NewtonBodyAddForce(body,force);
Its also easy to get the body linear and angular velocities.
Advertisement