[Solved]Bug in Linkpoint Offset?
by Matthew Hoesterey · in Torque X 2D · 09/29/2010 (3:23 am) · 1 replies
Hi, I just wanted to verify that this is a bug.
I was going to move all my particle systems over to use the mount system. Currently I use a custom component to manually set the position of the particles and I figured the mount system would be more efficient now that it is supposed to work.
Trying to set an offset from the link point I found that any offset would cause the particle to go way off screen.
In this method:
public Vector2 GetWorldLinkPosition(Vector2 linkPos, float linkRot, Vector2 offset)
I found this line:
Vector2 pos = halfSize * (linkPos + offset);
it turns out that the offset is multiplying half the size of the sprite by the offset. is this intended for some reason I'm missing?
If not I can just add the offset rather then multiply. I'm really just looking to offset a particle x pixels from the object.
Thanks. :)
I was going to move all my particle systems over to use the mount system. Currently I use a custom component to manually set the position of the particles and I figured the mount system would be more efficient now that it is supposed to work.
Trying to set an offset from the link point I found that any offset would cause the particle to go way off screen.
In this method:
public Vector2 GetWorldLinkPosition(Vector2 linkPos, float linkRot, Vector2 offset)
I found this line:
Vector2 pos = halfSize * (linkPos + offset);
it turns out that the offset is multiplying half the size of the sprite by the offset. is this intended for some reason I'm missing?
If not I can just add the offset rather then multiply. I'm really just looking to offset a particle x pixels from the object.
Thanks. :)
Torque Owner Matthew Hoesterey
I'll have to change out all my fx math but hopefully cutting out all those components will be worth it.