fonrus 1 Posted October 22, 2015 I seem to be having troubles getting the correct model for clicking on animating/post animation game objects. First a working model: Here you can see it will give a valid point to click on the object. Here is the same object after its animation (ID changes) gameObject.getClickablePoint() does not work well at all in this case. what is the best way around this? Is there a way to update the model to where it actually is in the animation? - Fonrus
Zompies 20 Posted October 23, 2015 I seem to be having troubles getting the correct model for clicking on animating/post animation game objects. First a working model: Here you can see it will give a valid point to click on the object. Here is the same object after its animation (ID changes) gameObject.getClickablePoint() does not work well at all in this case. what is the best way around this? Is there a way to update the model to where it actually is in the animation? - Fonrus How do you get that wire frame effect?
fonrus 1 Author Posted October 23, 2015 does the id change once it has been set? The id does indeed change, but that is the model for the new id. How do you get that wire frame effect? In your script you can do something as such: //@ScriptManifest(...) public class myScript extends AbstractScript(){ public GameObject go; public int onLoop(){ go = this.getGameObjects().getTopObjectOnTile(new Tile(xxx,xxx,0)); } public void onPaint(Graphics g){ go.getModel().drawWireFrame(g); } }
Nuclear Nezz 2105 Posted October 23, 2015 Rather than doing getTopObjectOnTile, do a closest(filter) that just grabs an object on a tile. so object->object != null && object.getTile().equals(new Tile(xxxx,xxxx,0)) There are problems with getTopObjectOnTile sometimes, and it grabs a bad reference.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.