Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: origin  (Read 1929 times)

0 Members and 1 Guest are viewing this topic.

lid6j86

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Email
origin
« 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?

Haze

  • Full Member
  • ***
  • Posts: 201
    • View Profile
    • Github Profile
Re: origin
« Reply #1 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.

 

anything