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 » Scripters
Home Search
 

Re: !! I AM AN EAGLE IN THE SKY !!

Previous Thread :: Next Thread 
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Jul 2016 06:55 PM
Okay. So you may have gussed, this thread is about flight.


ANYWAY


I am making a little plane that you can control. I want it so that wherever your mouse points, the plane will go. I figured out that if you set the Velocity in a BodyVelocity to a position, it will go to that position. The only way to get the position of the mouse that I know of is the UnitRay. How can I get ONLY coordinates of the mouse, and not where the camera is. The UnitRay draws a ray from your camera, to the location of your mouse on a 3D plane.

In short, here is my question: How can I get the Vector3 Position of the mouse from the UnitRay?
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
26 Jul 2016 06:56 PM
mouse.Hit
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Jul 2016 07:31 PM
Thanks!

!! OKAY NEW QUESTION !!

Mouse.Move:connect(function()
workspace.Drone.Main.BodyPosition.Position = Vector3.new(Mouse.Hit)
print(workspace.Drone.Main.BodyVelocity.Velocity) --Prints out 0,0,0 :/
end)


I made this. I also tried it with a BodyVelocity. All it prints out is 0,0,0 and the drone doesn't move. Why?
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
26 Jul 2016 07:32 PM
did you even set the max force


Add 13,000 posts
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Jul 2016 07:42 PM
Wait what?
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Jul 2016 07:44 PM
Oh you mean set the MaxForce? Yes I did it in the script and manually. They are both at 40000, a common setting for MaxForce
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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