#Is there a way to set the origin of a node

14 messages · Page 1 of 1 (latest)

leaden moon
#

Is there a way to set the origin of a node so that future translations move the node based on it's new origin.

Here is an example drawing:

lament urchinBOT
#

Hey, @leaden moon!
Please remember to /close this post once your question has been answered!

leaden moon
open ferry
leaden moon
open ferry
#

Imagine a cartesian plane with images that can move across the plane. That's all a tile map is. Works wonders on a 2d game

#

the best way to make a 2d game actually

leaden moon
#

the solution was quiet simple. I have to use .setTranslateX and .setTranslateY to change the position of the origin. facepalm

open ferry
#

yeah you could just move them with x and y instance variables

#

but if you are making a game, look into tile maps, will save you a lot of pain

leaden moon
#

hm don't think those are in JavaFX. then again I wouldn't expect it to because it's not really a game library

#

anyways thanks for the information, I'll keep that in mind.