SFML community forums

Help => Graphics => Topic started by: lid6j86 on July 08, 2014, 05:10:43 pm

Title: origin
Post by: lid6j86 on July 08, 2014, 05:10:43 pm
I am following the SFML book, and have a parent/child relationship between entities.

I have something that sets the origin to the center (i double checked with some output, it is indeed setting the origin to the center).

What's happening is child entities with a position of (0,0) dont center their origin to the parent origin, it centers the child origin on the top left corner of the parent entity.  What is causing this?
Title: Re: origin
Post by: Haze on July 08, 2014, 06:15:44 pm
How your parent/child relationship is defined? Show us an example code.
You want the position of the children be relative to the parent's position?

Origin is just the reference point for transformations, I'm not sure of what you're trying to achieve.