|
| 28 Jun 2014 04:53 PM |
Recently I have attempted to build a boat. I have used body position to keep the boat floating, body gyro to retain stability, and body angular velocity for turning.
However, I'm not sure how I should achieve propulsion. I tried using body force as it applies power in a direction based on the rotation of its parent, but I really need to use the velocity property to move my boat. The body force is very awkward since its effect lingers even after its "force" is reduced to zero. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Jun 2014 04:59 PM |
| There's no drag in Roblox, so that'd be why. I think BodyVelocity would be more suited to what you're doing, because if you set the Velocity to 0,0,0, it will apply force in the opposite direction to slow down. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2014 05:06 PM |
| I tried body velocity, but it moves the part in world space rather than in the direction that the part is pointed. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Jun 2014 05:14 PM |
Ah right. Just constantly update the Velocity property with
velocity = part.lookVector * maxSpeed
where part is a brick which faces in the direction of the ship. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2014 05:16 PM |
| Thank you very much! It works like a charm now. |
|
|
| Report Abuse |
|
|