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



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 pin the engine on the dropship 
Author Message
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post pin the engine on the dropship
i really need help getting the engines in the right place for the custom dropship i`m making and i looked at Azukki`s guide for sprite offsets and everything else but, that guide is for weapons, not crafts.


Thu May 15, 2014 6:47 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
The technique is the same for all offsets in general. Figure out where your sprite offsets on the sprite is, and then count the X distance and Y distance in pixels to get to the spot where you want the placement offset of whatever to be. If it looks like it's far off, make the X or Y value negative or positive depending on which one looks off, and then just tweak it bit by bit.


Thu May 15, 2014 6:58 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
after you suggested that, i tried it, and it ended up messing up just as bad as before


Thu May 15, 2014 7:11 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
If the engine looks like it's on the opposite side of the ship's sprite offset of where it needs to be, make the opposite-seeming coordinate value negative if it's positive, or positive if it's negative.

Also, most dropship engines have a JointOffset too, so you need to be adjusting your offset based on your ship's SpriteOffset, and the engine's JointOffset.


What you can also do is increase a single coordinate (either the X or the Y) by a massive amount in either the negative or positive, to figure out which direction it's supposed to go, and then tweak from there.


Thu May 15, 2014 7:17 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
at the current moment, the engine that is supposed to be on the right is hovering below the drop ship and the engine that is supposed to on the left is hovering above the dropship


Thu May 15, 2014 7:20 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
That's your Y offset that is off then. X is side-to-side, Y is up and down.


Thu May 15, 2014 7:22 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
they are also hovering in the center like this:

left engine


body


right engine


Thu May 15, 2014 7:25 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: pin the engine on the dropship
Perhaps it would help if we saw the offset themselves.

Positive X is Right
Negative X is Left
Positive Y is Down
Negative Y is Up

Edit: There are 3 offsets to be worried about: (or perhaps 4)
The sprite offset of both engines and the dropship itself. This should be the same as the tutorial's gun sprite offset. The offset will determine the center of gravity
The joint offset of both the engines. (Located under the engine) this changes where the 'joint' of the engine is, where the engine will rotate around while attached to the ship (think swivel)
The parent offset of both the engines. (Located under the dropship, this changes where the joint of the engine will be attached to.


Thu May 15, 2014 7:29 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
here is the ugly piece of clap in all of its ship

Image

the sprite is still WIP

ingame: Image

joint off set for the right engine:
Code:
   JointOffset = Vector
      X = 47
      Y = -25


joint off set for left engine:
Code:
   JointOffset = Vector
      X = -50
      Y = 63


sprite off set for right engine:
Code:
   SpriteOffset = Vector
      X = -22
      Y = -21


sprite off set for left engine:
Code:
   SpriteOffset = Vector
      X = -12
      Y = -21


parent off set for left engine:
Code:
      ParentOffset = Vector
         X = -49
         Y = -3


parent off set for right:
Code:
      ParentOffset = Vector
         X = 49
         Y = -3


Last edited by grave accent on Thu May 15, 2014 7:43 am, edited 2 times in total.



Thu May 15, 2014 7:34 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
Knowing the SpriteOffsets of the engines, and the ParentOffsets, would help too.


Thu May 15, 2014 7:37 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: pin the engine on the dropship
in game screen shot would be useful


Thu May 15, 2014 7:40 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
Check to see if there is a ParentOffset definition in both the engine code chunk and the dropship code chunk that applies for the same engine. If there's a duplicate offset, I believe the latter one is the one that applies.


Thu May 15, 2014 7:49 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
the problem im having is that the engines dont go where they`re supposed to despite the fact that i have done everything correctly... as far as i know, also i have no idea what a parent offset does


Thu May 15, 2014 7:53 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: pin the engine on the dropship
The ParentOffset is the main offset that you tweak to position an attached object.

JoinOffset is where you want the "joint" of a particular object to be, which would be over a hinge-looking thing for an engine if it has one, for example.


Thu May 15, 2014 7:54 am
Profile
User avatar

Joined: Wed Apr 16, 2014 8:53 am
Posts: 64
Location: Bunker busting.
Reply with quote
Post Re: pin the engine on the dropship
so, do i want to change the parent offsets to the current values of the joints and change the joints to the values of the base dropship`s?


Thu May 15, 2014 7:57 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

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.084s | 14 Queries | GZIP : Off ]