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 » Game Design
Home Search
 

Re: Drawing a triangle in a tilted plane?

Previous Thread :: Next Thread 
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
24 Mar 2015 07:06 PM
I'm trying to make a turret work based on CFrame and point towards the mouse, so my idea is to construct two triangles and use the hypotenuse angle.

The first triangle would be to calculate the slew angle of the turret, and the second would be for the pitch. However, if the tank the turret is on were to get tilted, I need to take this into account. How would I draw the triangle on the same plane as the tank?
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
24 Mar 2015 07:28 PM
I have an example here to help visualise it:
http://gyazo.com/0a6edbf5674a77433f6b93c333e3bb6c


The red dot is where the mouse is

The white line is the normal (0 degrees) for slew
The black line is the normal (0 degrees) for pitch and is also the direction of slew

The yellow angle is the slew angle
the blue angle is the pitch angle

I need a way of working out those two angles by "drawing" those triangles in the plane of the turret. I can do the maths of working out the angles fine; I just need advice on how to draw the triangles on a tilted plane.
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
24 Mar 2015 07:32 PM
Would it be possible to get those angles by somehow drawing a vector from the turret to the point, and taking away the tilted normal turret (0 degrees tilt & slew) vector or something like that?
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
25 Mar 2015 11:42 AM
Anyone?
Report Abuse
AlgyLacey is not online. AlgyLacey
Joined: 14 Jun 2013
Total Posts: 3736
25 Mar 2015 12:54 PM
Try the Scripters forum.


-[ Check this out! http://www.roblox.com/games/217210581/Farmulator ]-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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