is it possible to turn off pixel snapping programatically while the game is runn

designpeg

  • *
  • Posts: 731
Does anyone know if I can use a code block to do this?

JeffreyDriver

  • Posts: 2262
I don't quite understand. Do you have a snap-to-grid behaviour?

Justin

  • *
  • Posts: 4645
For 3.5:

Code: [Select]
com.stencyl.Config.pixelsnap = false;
For older versions:

Code: [Select]
scripts.MyAssets.pixelsnap = false;
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

designpeg

  • *
  • Posts: 731
Great Justin, just what I was looking for, thanks.

stefan

  • *
  • Posts: 2263
Im curious. Why do you want that?

designpeg

  • *
  • Posts: 731
My game runs really smoothly on most devices, but older ipads >5yrs old run much smoother with pixel snapping on, so I'm working out from the device resolution which device it's on and selectively turning on pixel snapping.

Also, pixel snapping doesn't seem to apply to tweened actors or images , just placed using x y, so in certain places where I want both to be aligned It's useful  for me to toggle this.