|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 26 Jul 2016 07:32 PM |
did you even set the max force
Add 13,000 posts |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|