I want to have an Object, which rotates in one point. This rotation sould follow the position of an other object, which moves around the first object.
But I've got no idea, how to make this come true.
Thanks for any help!
public void act(){ Actor coll = getOneIntersectingObject(Man.class); if(coll != null){ pointAtObject(coll); } }
private Actor trackedMan = null; public void act(){ Actor coll = getOneIntersectingObject(Man.class); if(coll != null){ trackedMan = coll; } if(trackedMan != null){ pointAtObject(trackedMan); } }
private Actor trackedMan = null; public void act(){ try{ trackedMan = getWorld().getActors(Man.class).get(0); } catch (Exception e) { // } if(trackedMan != null){ pointAtObject(trackedMan); } }
List<Man> man = getObjectsInRange(10, Man.class);
ArrayList<Actor> listOfActors = new ArrayList<Actor>();