|
| 22 Aug 2016 03:02 AM |
Trying to make it so that you can control the movement of a multiple-part-model with just the mouse.
I tried doing BodyVelocity, BodyGyro, and BodyAngularVelocity and BodyGyro didn't do anything, BodyAngularVelocity just rotated it but didn't make it follow, and BodyVelocity followed it BUT could only follow in one path, it wouldn't follow in X and Z, it'd just stay with X, sometimes glitch and go up or down but it doesn't follow the mouse like i want it to.
--Example of trying BodyGyro-- ch = plr.Character b = ch.Beyblade g = b.Damage Mouse = plr:GetMouse()
Mouse.Move:connect(function() print(b.NoTip.BodyGyro.CFrame) b.NoTip.BodyGyro.CFrame = (CFrame.new(Mouse.Hit.p.X,0,0)) end)
--Example of trying BodyVelocity-- plr = game.Players.LocalPlayer ch = plr.Character b = ch.Beyblade g = b.Damage Mouse = plr:GetMouse()
Mouse.Move:connect(function() b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, Mouse.Hit.p.Y, 0)) end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 22 Aug 2016 03:28 AM |
like Mouse.Hit.p.X + 10? The X moves just fine rn, but Y and Z don't.
b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, 0, Mouse.Hit.p.Z + .1)) causes it to go up and up and up forever and ever goes out of range immidiately (field of view), then falls off the map lol.
b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, 0, Mouse.Hit.p.Z)) does basically the same thing but has a litte more control but i have to change the camera which is bad.
Atm I use a camera that is stuck at an angle, viewing an arena, I want it to where the object follows the cursor smoothly |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2016 03:40 AM |
Atm I have it to where if I change the camera mode, it will follow the mouse but the mouse has to be on the other side of the map for it to move in that direction, so the controlling is a bit off?
also, i need the camera to be in Scriptable, not Custom, it seems to work best in custom (only goes to the left top corner if i do Scriptable) |
|
|
| Report Abuse |
|
|
pullman45
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 22 Aug 2016 05:55 AM |
I have a working script for just that.
The script makes the player follow the mouse while the right button is being held and the character adjusts its speed according to how far the mouse is from the player (inspired by DS LoZ games). |
|
|
| Report Abuse |
|
|
pullman45
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 22 Aug 2016 05:55 AM |
But it was for the character and not models.
Derp |
|
|
| Report Abuse |
|
|