|
| 13 Dec 2011 08:01 PM |
I need some help with CFrameing ex game.Workspace.Part.CFrame = CFrame.new(0,1,0)
That will SET it to 1 but how would i just ADD 1 to its current position? |
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
|
| 13 Dec 2011 08:02 PM |
| game.Workspace.Part.Position = game.Workspace.Part.Position + Vector3.new(0,1,0) |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:02 PM |
I want CFrame not position.
|
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 13 Dec 2011 08:03 PM |
| Change .Position to .CFrame if you want overlapping bricks. |
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
| |
|
| |
|
natjdog09
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 1370 |
|
|
| 13 Dec 2011 08:06 PM |
"I want CFrame not position."
Just do this:
game.Workspace.Part.CFra=me = game.Workspace.Part.CFrame + Vector3.new(0,1,0)
I am pretty sure it'd work, if not then tell me.
Hope this helps. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:08 PM |
I tried this but it didn't work
game.Workspace.Part1.CFrame = game.Workspace.Part1:pointToObjectSpace + Vector3.new(0,1,0) |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:09 PM |
Umm I think I did that wrong.
|
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 13 Dec 2011 08:11 PM |
Eh, I think you should look at this:
http://wiki.roblox.com/index.php/CFrame |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 13 Dec 2011 08:11 PM |
You did.
You need to call the part's CFrame before using :toObjectSpace. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:12 PM |
| I'm trying to CFrame it on local axis.. :c |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:13 PM |
So
game.Workspace.Part1.CFrame = game.Workspace.Part1.CFrame:pointToObjectSpace + Vector3.new(0,1,0)
tried that and still no beans. :ccccc |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 13 Dec 2011 08:13 PM |
| You call pointToObjectSpace on a CFrame and set its argument to a Vector3. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:15 PM |
I'm trying to get kinda liek the local axis so if y axis is rotaed 50 deg and i make it move up by 1 on y then it will move in a 50 deg tilt.
|
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:16 PM |
I feel like a brainless fool.
|
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:39 PM |
My god... So simple and none of you could do this ;c?
Part.CFrame = Part.CFrame * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
First set of (0,0,0) Will controll position. It will move from the bricks current CFrame
Second set of (0,0,0) Will controll rotiation. You can use things math.rad(45) to give rotations in degrees.
Just as an example. to move the Part 3 studs on the X axis, and 2 Studs on the Y axis, then Turn it 45 degrees (Y axis) It would look like this.
Part.CFrame = Part.CFrame * CFrame.new(3,2,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(45),0) |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:39 PM |
e = game.Workspace.Part1.CFrame = CFrame.new:pointToWorldSpace(1,1,1)
print(e)
Got this in output 21:39:00 - Workspace.Script:1: unexpected symbol near '=' |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:42 PM |
How do I use CFrame:toObjectSpace(CFrame)
CFrame:pointToObjectSpace(Vector3)
:s |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2011 08:46 PM |
If your not going to help GO AWAY. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:51 PM |
part = game.Workspace.Part
part.CFrame = part.CFrame * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
This seems to work but I don't know why. :s
Wouldn't it be + not * :ssss
I feel even more like a idiot then I did befor.
|
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:54 PM |
Directly from the wiki
CFrame * CFrame -- returns composition of two CFrames CFrame * Vector3 -- returns Vector3 transformed from Object to World coordinates CFrame + Vector3 -- returns CFrame translated (slid) by Vector3 CFrame - Vector3 -- returns CFrame translated (slid) by -Vector3 |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 08:56 PM |
Wtf is slid?
Sorry for me knowing so little about CFraming It's alwas so hard for meh. :c |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 09:00 PM |
Everyone learns, it's okay for having some frustration and questions about it.
Slid is basicly moving a part so far on the specified axis.
part.CFrame = Vector3.new(0,0,3) -- is going to move it 3 studs on the Z Axis from it's workspace position, not the bricks CFrame. |
|
|
| Report Abuse |
|
|