Search the Community
Showing results for tags 'absolute position'.
-
Hi, Im pretty confused In the attached playground I create a sphere at (0,0,0). Then I change the pivot point to (0,-5,0) (the bottom of the sphere). At this point the absolute position of the sphere is still (0,0,0). However, when do setAbsolutePosition(0,0,0) I would expect no change. But the absolute position changes to (0,5,0). Why is this happening? https://playground.babylonjs.com/#RTE4BS#6 Thanks!
-
Is there any way to get the absolute position of a sprite? I have a group holding several sprites and I want to move one of them. The group will be moved as a whole. The sprite's position is relative to the group, but I would like the position relative to the world, or more precisely, relative to the activePointer. I have tried using physics.arcade methods, such as angleToPointer, but those methods do not take inte account the object's offset, that is its parents' positions (the group's position). Is there any way built into Phaser to accomplish this? Or do I need to iterate over all parents and calculate the absolute position in my own function?
- 4 replies
-
- absolute position
- offset
-
(and 3 more)
Tagged with: