Data Realms Fan Forums
http://forums.datarealms.com/

pin the engine on the dropship
http://forums.datarealms.com/viewtopic.php?f=1&t=45704
Page 1 of 2

Author:  grave accent [ Thu May 15, 2014 6:47 am ]
Post subject:  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.

Author:  CaveCricket48 [ Thu May 15, 2014 6:58 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:11 am ]
Post subject:  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

Author:  CaveCricket48 [ Thu May 15, 2014 7:17 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:20 am ]
Post subject:  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

Author:  CaveCricket48 [ Thu May 15, 2014 7:22 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:25 am ]
Post subject:  Re: pin the engine on the dropship

they are also hovering in the center like this:

left engine


body


right engine

Author:  dragonxp [ Thu May 15, 2014 7:29 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:34 am ]
Post subject:  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

Author:  CaveCricket48 [ Thu May 15, 2014 7:37 am ]
Post subject:  Re: pin the engine on the dropship

Knowing the SpriteOffsets of the engines, and the ParentOffsets, would help too.

Author:  dragonxp [ Thu May 15, 2014 7:40 am ]
Post subject:  Re: pin the engine on the dropship

in game screen shot would be useful

Author:  CaveCricket48 [ Thu May 15, 2014 7:49 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:53 am ]
Post subject:  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

Author:  CaveCricket48 [ Thu May 15, 2014 7:54 am ]
Post subject:  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.

Author:  grave accent [ Thu May 15, 2014 7:57 am ]
Post subject:  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?

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/