|
| 16 Aug 2016 10:49 PM |
How easy is it to get a Character to face the direction of brick? Mostly.
Basically, I have a pickax tool and I'm trying to face a rock when I click it. Obviously, I don't want the Character to face up or down at all. Just one axis.
Can someone direct me to the correct wiki article? I know it's CFrame related, just unsure of the details. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 10:53 PM |
use a bodygyro or use the torso and set your chosen to have a CFrame of
CFrame.new(torso.Position,part.Position)
which creates a cframe from pointA pointing at pointB |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 10:56 PM |
This method will work. Unfortunately I was hoping for something a bit more instant. Gyros take a moment to point to its target. Especially if you are point in the exact opposite direction.
Thanks though. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 10:57 PM |
^ you can pick between torso cframe or body gyro
also body gyro can turn quickly, you just have no idea how it works
if you understood what P,D,MaxTorque did, you would know it is fully configurable to fit your needs D is the damping or smoothness P is the force used MaxTorque is how much force can be put on all the axis angles |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:03 PM |
"also body gyro can turn quickly, you just have no idea how it works"
Not nice.
In anycase, you say Torso CFrame, but that doesn't tell me anything. How do I set the directional CFrame. I know CFrame moves it's position, I know CFrame.Angles turns it, but how do I face it in the direction of a brick without the up and down factor? |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:04 PM |
| I explained to you what the body gyro does and if you decide to act that way against my judgement then so be it but it is pretty easy to isolate the up/down factor but I am too lazy to mess with CFrame.p*Vector3 atm so ask someone else |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:06 PM |
| I am telling you, I am not looking for the Gyro method, but a more direct CFrame method. If you are "Too Lazy" to give me what I am asking for, then why are you posting? This does not help me. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:09 PM |
^ CFrame method is not smooth and looks crappier
also just reset the Y position so that it only tracks the X and Z
CFrame.new(torso.CFrame.p*Vector3.new(1,0,1),part.CFrame.p*Vector3.new(1,0,1)) * CFrame.new(0,torso.CFrame.Y,0) |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:18 PM |
| You are right. CFrame will instantly redirect me. I have used the Gyro method much more then you think in other situations. This situation I need an instant turn. Thank you. This will help me greatly. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:19 PM |
| Also the line you gave me is flawed. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:25 PM |
it works, instead of replacing my words, declare variables
what it does it it will draw a CFrame from pointA to pointB
the difference here is that the positions will have a Y of 0, meaning they arent up or down from eachother then if you add back the torso Y, you get a CFrame looking towards pointB without looking up or down |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:28 PM |
blarg u overcomplicated the cframe a lot
torso.CFrame = CFrame.new(torso.Position,Vector3.new(part.Position.X,torso.Position.Y,part.Position.Z))
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
Objectly
|
  |
| Joined: 18 Jul 2016 |
| Total Posts: 210 |
|
|
| 16 Aug 2016 11:33 PM |
| Look at blarg's recent post with his module. |
|
|
| Report Abuse |
|
|