generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Body Mover Objects: Velocity relative to rotation

Previous Thread :: Next Thread 
BonebreakerBlitzen is not online. BonebreakerBlitzen
Joined: 02 Feb 2011
Total Posts: 61
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 is not online. 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
BonebreakerBlitzen is not online. BonebreakerBlitzen
Joined: 02 Feb 2011
Total Posts: 61
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 is not online. 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
BonebreakerBlitzen is not online. BonebreakerBlitzen
Joined: 02 Feb 2011
Total Posts: 61
28 Jun 2014 05:16 PM
Thank you very much! It works like a charm now.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image