|
| 17 Aug 2013 10:30 PM |
| How do I get a parts corner position? I`m trying to make a destructable wall. |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 17 Aug 2013 10:32 PM |
oh god
local pos = part.Position
local corner = Vector3.new(pos.X + part.Size.X/2, pos.Y + part.Size.Y/2, pos.Z + part.Size.Z/2)
play around with adding and subtracting to find what gives you what corner |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2013 10:39 PM |
| That`s exactly the same way I did it. I was looking for another method since that does not work when the part is rotated. |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 17 Aug 2013 10:45 PM |
| mate you are getting into hacky and annoying script territory |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2013 10:47 PM |
| That`s the way I like it. I already made the script, It`s just glitchy if I use unanchored parts. I was thinking of somehow adding in it`s rotation, But I got lost after that. |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2013 10:56 PM |
| No one has any ideas at all how I could approach this differently? |
|
|
| Report Abuse |
|
|
Newtrat
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 196 |
|
|
| 17 Aug 2013 11:57 PM |
My guess would be
local offset = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z/2) local corner = part.CFrame:vectorToWorldSpace(offset)
Does that work at all? |
|
|
| Report Abuse |
|
|
| |
|
Cakins
|
  |
| Joined: 23 Jul 2009 |
| Total Posts: 307 |
|
|
| 18 Aug 2013 03:51 AM |
I think this is it? Man, I am getting into lots of rotation scripts today. This should give you one corner, though honestly I don't know which :/
part = workspace.Part
a = Vector3.new(part.Size.X / 2, part.Size.Y / 2, part.Size.Z / 2) corner = a * part.CFrame.lookVector |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 04:15 AM |
My least favorite people on the internet(are of course idiots) are people who use ` in a conjunction... WHY DO PEOPLE USE THAT?!
"I'm not Singaporian!" - CeaselessSoul |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 04:20 AM |
| Because I was born left handed, Problem? |
|
|
| Report Abuse |
|
|
sam8985
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 582 |
|
|
| 18 Aug 2013 04:24 AM |
| Ceaseless, you mean a contraction, not a conjunction ;) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 05:13 AM |
| Nope LookVector returns a Vector3 with values between 0-1 and anything * 0 would be 0 so that would mess it up. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 05:15 AM |
| @CeaselessSoul: It`s just a habit I picked up when I was young. Ignore it or i`ll ignore you. |
|
|
| Report Abuse |
|
|