fonrus 1 Share 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 Link to comment Share on other sites More sharing options...
RealEngine 24 Share Posted October 22, 2015 does the id change once it has been set? Link to comment Share on other sites More sharing options...
Zompies 20 Share 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? Link to comment Share on other sites More sharing options...
fonrus 1 Author Share 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); } } Link to comment Share on other sites More sharing options...
Nuclear Nezz 2012 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.