OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 10 Jul 2015 08:20 PM |
Ok, so I have a mesh, but the mesh points towards the bottom surface, so if I spawn it in front of my player AND want it to face the direction my player is facing (which works, by that i mean the front surface correctly faces the way the player is, BUT:), how can I get the bottom surface facing the way the front surface was originally facing? So that the mesh which is facing towards the bottom surface, will be pointing AWAY from the players FRONT side, so like an arrow pointing the opposite direction of the player.
If you think adding or subtracting 180 degree values will work, it won't, already tested, because if i am facing a completely random direction, doing that would only rotate it in a funny way and not actually make it face the correct way, this is where its bothering me, i need to know what method to use in order for this to work, please help me out! |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 10 Jul 2015 08:25 PM |
| ugh, forums take too long sometimes (as i realize only 4 minutes have passed) |
|
|
| Report Abuse |
|
|
| |
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 10 Jul 2015 08:27 PM |
spawnPart.CFrame = CFrame.new(spawnHook.Position + (player.Character.HumanoidRootPart.CFrame.lookVector * 3)) * CFrame.Angles(math.rad(player.Character.Torso.Rotation.X), math.rad(player.Character.Torso.Rotation.Y), math.rad(player.Character.Torso.Rotation.Z)) --all one line
that's basically the code, just the rotation is the problem, not the positioning. |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
| |
|
KoreanBBQ
|
  |
| Joined: 06 Mar 2015 |
| Total Posts: 1436 |
|
|
| 10 Jul 2015 09:16 PM |
| Ez pz jus make lookVector of the arrow to your players lookVector *CFrame.Angles(0,math.pi,0) |
|
|
| Report Abuse |
|
|