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 are Hats' Attachment properties interpreted?

Previous Thread :: Next Thread 
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 10:13 AM
My hat's AttachmentPos is 0,.4,0 but it's position on my character relative to my head is actually 0,.1,0. I've compared all of my hats and the AttachmentPos is always wrong. What do these numbers mean and how are they interpreted? How is Roblox getting the actual positions based on these random numbers?
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
19 May 2013 10:26 AM
Maybe the AttachmentPos is relative to the Neck in your torso and not directly to the head.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
19 May 2013 10:30 AM
It's relative to the HeadWeld's C0 that all hats have in your Head. If the HeadWeld's C0.p.y is .5, then if you put .5 in the Y of the AttachmentPos, it will be at the center of your Head.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
19 May 2013 10:55 AM
Use AttachmentPoint. It's easier and makes more sense.
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 11:15 AM
There is a HeadWeld for each hat, though. If I use InsertService to insert a hat and then want to position the hat on a fake character, how would I determine how to position it based on the information given to me from the inserted hat? All it tells me is the C1, and the C0 isn't constant, so wat do?
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
19 May 2013 11:15 AM
I usually just keep changing the value until it seems correct.
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
19 May 2013 11:16 AM
Just find a formula to change the numbers correctly, like if positioning it at 0,0.5,0 will only really position it to 0,0.1,0, just make something to interpret it.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
19 May 2013 11:28 AM
The C0 is constant. It's always 0,0,0 for hats and tools.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
19 May 2013 11:34 AM
"The C0 is constant. It's always 0,0,0 for hats and tools."

No it isn't. Go check that if you'd like.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
19 May 2013 11:44 AM
My bad, it's actually 0, 0.5, 0.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
19 May 2013 11:44 AM
lol = game:GetService("InsertService")
hat = lol:LoadAsset(116073839)
hat.Parent = workspace
hat:MoveTo(fakecharacter.Torso.Position)

tada, aslong as you have a humanoid in the fake character it will auto fit the hat on the head.
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 12:24 PM
It isn't constant at all. It is constantly different between hats, and I would like to know what they are without needing to wait for Roblox to make the welds for me. I want to position the part where the hat goes, I don't want Roblox to do it for me after a long pause.
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 04:39 PM
The AttachmentPoint of a Hat is the C1 of the HeadWeld. What is the C0?
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
19 May 2013 05:05 PM
What do you mean, "what is the C0"?

The AttachmentPos is related to the C0, unless you want to know what the C0 is.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
19 May 2013 05:06 PM
what are you exactly making which will need that amount of speed?
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 05:56 PM
@SIX An online building tool.
@NicNac The AttachmentPoint is the C1 of the HeadWeld. If I weld the Handle to the Head using nothing but the C1, it is offset, and that offset is the C0. I need to know how to determine what the C0 would be without having Roblox generate the HeadWeld, because I just want to instance the hat from the catalog, take out the AttachmentPoint and the Handle, and weld it to a model positioned correctly.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
19 May 2013 06:04 PM
@waffle

I'm actually pretty sure that Arceus was right. Every hat appears to have a C0.p of 0,.5,0. Technically, this would also make sense. Try it out for a bit - there's no reason why this wouldn't work.
Report Abuse
databrain is not online. databrain
Joined: 01 Jan 2013
Total Posts: 3342
19 May 2013 07:37 PM
GET OUT.

JK, I'm just saying that because you overse it.

Anyways, It's relative to the neck joint's position (C0.p)
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 07:39 PM
    h.CFrame = head.CFrame*c.AttachmentPoint*(CFrame.new(0,.5,0)-c.AttachmentPos)-c.AttachmentPos

This seems to be working.
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