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: How would I go about this?

Previous Thread :: Next Thread 
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:27 PM
I'm having a hard time thinking about this.


I need to rotate a square so its corners hit certain defined points. How would I go about this?
Report Abuse
dbo12 is not online. dbo12
Joined: 06 Feb 2010
Total Posts: 600
24 Jul 2013 02:28 PM
Building helpers
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:29 PM
With a script..
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
24 Jul 2013 02:29 PM
I don't really know...Make several clones of said part that are invisible and cancollide false, then make them each rotated slightly more until the corners get what you want, then remove all of the clones and make the original's rotation at that point?

~ Linguam latinam est optimum ~
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:31 PM
An equation of some sorts would be much more preferred rather than trial and error.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Jul 2013 02:33 PM
Do you know the position of the 4 points? If so, I know what you need to do if you give me 5 minutes to work through it lol
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:34 PM
I know the position of the 4 points and the center of the square.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Jul 2013 02:34 PM
Oh lovely. Are the 4 points one of the axial planes?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:35 PM
Could you also briefly say/describe what methods you are using? Like the names of the equations? I wish to learn a lot more about this.
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
24 Jul 2013 02:35 PM
its a custom equation
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:35 PM
I'm not sure what you mean. They are just 4 Vector3 values.
Report Abuse
J0SHlE is not online. J0SHlE
Joined: 09 Jul 2013
Total Posts: 13
24 Jul 2013 02:36 PM
op needs the formuoli
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
24 Jul 2013 02:37 PM
scriptioli scriptioli give me the formuoli
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 02:37 PM
[ Content Deleted ]
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Jul 2013 02:38 PM
Easiest way:

midpoint = Vector3.new((point1.x-point2.x)/2,(point1.y-point2.y)/2,(point1.z-point2.z)/2)

part.CFrame = CFrame.new(part.Position,midpoint)

That just makes the brick look at the midpoint of two points.

So like A and B in this scenario are the two corners you're using
AB
CD
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Jul 2013 02:40 PM
@Oysi

My way cheats and is easier ok?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 02:47 PM
[ Content Deleted ]
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:49 PM
I'm treating it as a square and not as a cube so I'm not sure how to define points such as back or right.


I put it in and its making the blocks y position 3.4x10^25 or so.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Jul 2013 02:51 PM
@Oysi

orly? Hm, don't use CFrame ever because yolo I hate 3d workspaces.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 02:54 PM
[ Content Deleted ]
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 02:56 PM
But I only have 2 adjacent corners. (I know I messed up the position).
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 02:59 PM
[ Content Deleted ]
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
24 Jul 2013 03:00 PM
No it's in 3d space but im treating the brick as 2d (a square) as it is really thin.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 03:07 PM
[ Content Deleted ]
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Jul 2013 03:09 PM
[ Content Deleted ]
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