KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 04 Oct 2015 05:34 PM |
| I have a BodyPosition and I'm trying to figure out how to have it constantly in front of the player, no matter what direction they are facing. I tried messing around with lookVector but I couldn't figure out how to get it. Can someone explain how? |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 05:34 PM |
| Just use a Vector4, I bet you're too stupid to know what that is. Pleb. |
|
|
| Report Abuse |
|
|
| |
|
larr1212
|
  |
| Joined: 06 Jan 2015 |
| Total Posts: 259 |
|
|
| 04 Oct 2015 05:36 PM |
| Vector4 is not a correct term for CFrame. |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 05:41 PM |
| I know, I was testing you idiots. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 04 Oct 2015 05:43 PM |
| you're humiliating yourself.. |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 05:44 PM |
| Your look is humiliating, and the fact that you think you can code. You idiots sicken me. |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
| |
|
|
| 04 Oct 2015 05:52 PM |
When you say "in front of," what is your frame of reference?
Would you like it to be "in front of" the player's view (i.e. the camera) or "in front of" the player's character? |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 04 Oct 2015 05:53 PM |
| Sorry, I mean in the direction that their torso is facing |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 04 Oct 2015 05:53 PM |
part.CFrame = torso.CFrame * CFrame.new(0, 0, -5)
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 04 Oct 2015 05:54 PM |
| You can weld it if you don't wanna continually update it but that'd add mass to your character IIRC. |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 04 Oct 2015 06:05 PM |
| Is it possible to have it as a Vector3 value? I'm using it to position a BodyPosition |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 06:06 PM |
(torso.CFrame * CFrame.new(0, 0, -5)).p
~The Wizard |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 04 Oct 2015 06:07 PM |
| part.CFrame = torso.CFrame * Vector3.new(0, 0, -5) |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 04 Oct 2015 06:10 PM |
| woops it would be blah.Position or blah.Velocity or whatever you're doing, not blah.CFrame = |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 06:18 PM |
Suggested reading: http://wiki.roblox.com/index.php?title=CFrame#Local_and_World_Space |
|
|
| Report Abuse |
|
|