View unanswered posts | View active topics It is currently Mon Jan 06, 2025 10:44 pm



Reply to topic  [ 6 posts ] 
 Any Way to Judge an Offset? 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Any Way to Judge an Offset?
Whatever you put the SpriteOffset as, all other offsets are based off of that.


Mon Jun 21, 2010 12:38 am
Profile
User avatar

Joined: Wed Feb 10, 2010 4:06 am
Posts: 1294
Location: Comox, BC, Canada
Reply with quote
Post Re: Any Way to Judge an Offset?
Give the gun to an actor in it's .ini, then go into the actor viewer. That way you can just press "reload actor's data" instead of rebooting the game itself One helluva timesaver.


Mon Jun 21, 2010 12:50 am
Profile WWW
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Any Way to Judge an Offset?
x is horizontal, y is vertical, the unit is pixels
The sprite offset is the center of mass and the base of most other offsets.
The sprite offset is offset from the top left corner of the image, with up and left being positive.
Thus, the sprite offset is almost always approximately the dimensions of the image, divided by negative 2.
EG, my assault rifle sprite is 30x10 pixels, my sprite offset is probably gonna be about X = -15 Y = -5

Most other offsets are offset from the sprite offset, with right and down being positive.
EG the muzzle of my assault rifle is 14 pixels to the right and 1 pixel above the position I previously made the SpriteOffset, so my muzzle offset will be X = 14, Y = -1


Edit: here's a little guide I whipped up, hopefully explaining my technique for determining offsets.
Chock-full of inconsistency between first, second, and maybe even third person!
Image
Feel free to use this guide however...
Except for editing it to intentionally give false information, and then redistributing it.
Or printing it off, making an origami bag out of it, and smuggling cocaine from mexico across the border in it.
Don't do either of those, those are bad things to do.


Attachments:
File comment: This might be handy, so you can imitate the technique and learn first hand.
WarfighterOffsetDemo.bmp [1.37 KiB]
Not downloaded yet
Mon Jun 21, 2010 12:56 am
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post Re: Any Way to Judge an Offset?
Azukki wrote:
x is horizontal, y is vertical, the unit is pixels
The sprite offset is the center of mass and the base of most other offsets.
The sprite offset is offset from the top left corner of the image, with up and left being positive.
Thus, the sprite offset is almost always approximately the dimensions of the image, divided by negative 2.
EG, my assault rifle sprite is 30x10 pixels, my sprite offset is probably gonna be about X = -15 Y = -5

Most other offsets are offset from the sprite offset, with right and down being positive.
EG the muzzle of my assault rifle is 14 pixels to the right and 1 pixel above the position I previously made the SpriteOffset, so my muzzle offset will be X = 14, Y = -1


Edit: here's a little guide I whipped up, hopefully explaining my technique for determining offsets.
Chock-full of inconsistency between first, second, and maybe even third person!

<Insert giant, super-helpful image here that I won't quote>

Feel free to use this guide however...
Except for editing it to intentionally give false information, and then redistributing it.
Or printing it off, making an origami bag out of it, and smuggling cocaine from mexico across the border in it.
Don't do either of those, those are bad things to do.


Thanks, Azukki! That's so helpful!


Mon Jun 21, 2010 3:20 pm
Profile
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Re: Any Way to Judge an Offset?
The magazine offset it's in the magazine's part , his name is "ParentOffset" , sometimes he is below this:

Quote:
Magazine = Magazine
CopyOf = Magazine


in the weapon's part


Wed Jun 23, 2010 7:33 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Any Way to Judge an Offset?
Again, I explain best with visuals... And get annoyed by how much photobucket is making itself terrible. But not enough to start using another service. Not quite.
Image
Please redistribute this guide wherever you think it will be most helpful.

Now that I've noticed the set of MSPaint numbers that I used in this guide, I might go back and simplify the other guide...
Edit: aaaannnd it is done


Wed Jun 23, 2010 9:13 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 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.032s | 14 Queries | GZIP : Off ]