i need help on my mouse curser i have a fake mouse seting its locatioon to the real one but i want it so that when i click my mouse it will click the thing below it


public void act() { if (Greenfoot.mouseClicked(null)) { MouseInfo mouse = Greenfoot.getMouseInfo(); if (getWorld().getObjectsAt(mouse.getX(), mouse.getY(), Actor.class).contains(this)) { // actions as if mouse clicked this actor } } }