- Joined
- Jul 24, 2014
- Messages
- 188
- Thread Author
- #1
@Cloud
I was playing with the Dev toolbox and found out that if you click on a GameObject, that GameObject's model is highlighted in the screen.
But after about 2 seconds I noticed the location(projection) of that model on screen was switching between 2 locations, while the GameObject itself never moves(it's a fire).
I then tried to System.out.println() the on-screen location using Projection#coordinateToScreen(fire.getPosition());
I put this in my onLoop() void, and guess what, this point actually changes!
The actual correct position is (309,201);
I managed to take a screenshot of both locations as well:
I think this might be the explanation for Interaction not working? As the getInteractionPoint() changes every 2 seconds, interaction can't possibly work..
Correct:
Wrong: (bottom of screen)
I was playing with the Dev toolbox and found out that if you click on a GameObject, that GameObject's model is highlighted in the screen.
But after about 2 seconds I noticed the location(projection) of that model on screen was switching between 2 locations, while the GameObject itself never moves(it's a fire).
I then tried to System.out.println() the on-screen location using Projection#coordinateToScreen(fire.getPosition());
I put this in my onLoop() void, and guess what, this point actually changes!
The actual correct position is (309,201);
Code:
java.awt.Point[x=309,y=201]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=309,y=201]
java.awt.Point[x=309,y=201]
java.awt.Point[x=429,y=299]
java.awt.Point[x=309,y=201]
java.awt.Point[x=309,y=201]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=429,y=299]
java.awt.Point[x=309,y=201]
I managed to take a screenshot of both locations as well:
I think this might be the explanation for Interaction not working? As the getInteractionPoint() changes every 2 seconds, interaction can't possibly work..
Correct:

Wrong: (bottom of screen)
