Hello Guest

Author Topic: Physics and pixel positioning  (Read 2985 times)

appymedia

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Physics and pixel positioning
« on: January 16, 2015, 10:07:37 am »
Hi All,

I would like to position my sprites by pixels and not units if possible.  I know I can adjust the pixels to units setting from the default of 100 to 1 to achieve this but I want to use physics as well and this won't work well then.  Is there any sort of scaling feature or similar in 2DTK that can help, or do I need to write a bit of code to work this out every time I re-position something?

Many Thanks
« Last Edit: January 16, 2015, 10:51:26 am by appymedia »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Physics and pixel positioning
« Reply #1 on: January 16, 2015, 01:50:43 pm »
You will need to write a function to convert between pixels to world units. The unity transform components only works in world units.