View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:44 pm



Reply to topic  [ 4 posts ] 
 Rotating Joints 
Author Message
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Rotating Joints
Is there any way to make rotating joints in CC with Lua? I'm trying to make something that does this:

Image

Just rotate up to a certain point, then rotate the other way. Just curious if something like this is possible with rotangle or anything.


Sun Jul 26, 2009 2:46 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Rotating Joints
Code:
attachable.ParentOffset = Vector(attachable.ParentOffset.Magnitude * math.cos(angle) , attachable.ParentOffset.Magnitude * -math.sin(angle))

Remeber to cast the attachable to an attachable before doing this.
And the old angle is attachable.ParentOffset.AbsRadAngle


Sun Jul 26, 2009 2:52 am
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: Rotating Joints
Um. Yeah I wish that I understood how to do that. I don't really know how to cast an MORay that well, let alone run lua on attachables.... :oops:


Sun Jul 26, 2009 3:00 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Rotating Joints
viewtopic.php?f=73&t=15359

By cast I mean:
Code:
attachable = ToAttachable(x)


Sun Jul 26, 2009 3:16 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.198s | 13 Queries | GZIP : Off ]