generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: cframe look at inverting part

Previous Thread :: Next Thread 
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
21 Dec 2015 05:00 PM
function CFrameLookAt(Pos1, Pos2, UpVector)
local UpVector = UpVector or Vector3.new(0,1,0)
local NormalizedDirection = (Pos2 - Pos1).unit

local XAxis = NormalizedDirection:Cross(UpVector).unit
local UpAxis = XAxis:Cross(NormalizedDirection).unit
return CFrame.new(
Pos1.X, Pos1.Y, Pos1.Z,
1, 0, 0,
0, UpAxis.Y, -NormalizedDirection.Y,
0, UpAxis.Z, -NormalizedDirection.Z
)
end

i have this function, but when i my character walk back, it doesn't rotates and the part gets inverted

could someone help me?
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
21 Dec 2015 05:25 PM
...
Report Abuse
XIPokezIX is not online. XIPokezIX
Joined: 24 Sep 2015
Total Posts: 381
21 Dec 2015 05:28 PM
You're to pro . Criz
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
21 Dec 2015 05:29 PM
what? just some vectors...
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
21 Dec 2015 05:45 PM
bump
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
22 Dec 2015 10:11 AM
bummp
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
22 Dec 2015 10:31 AM
bump
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
22 Dec 2015 11:01 AM
another bump
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
22 Dec 2015 11:42 AM
bump
Report Abuse
Vultorz is not online. Vultorz
Joined: 02 Mar 2015
Total Posts: 2985
22 Dec 2015 12:29 PM
Are there any errors in the output?
Report Abuse
LarzCaetano is not online. LarzCaetano
Joined: 26 Aug 2015
Total Posts: 280
22 Dec 2015 02:07 PM
no, just the part going inverse when i walk back and my character turns 180 degrees...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image