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: Rotation problems

Previous Thread :: Next Thread 
OKevinO is not online. 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 is not online. 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
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
10 Jul 2015 08:25 PM
Post the code.
Report Abuse
OKevinO is not online. 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 is not online. OKevinO
Joined: 05 May 2010
Total Posts: 1036
10 Jul 2015 08:38 PM
no reply...
Report Abuse
KoreanBBQ is not online. 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
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