Need help with AttachObject rotation
#1

//edit

DONE, the Code was correct, 123marvin123 fixed the Bug in the Shoebill API.

Old Request:

It should looks like this:



But if i attach every object to one object ( with the same rotation ), there will occure following error:



I think, this occured, when you write in AttachObject the differents between the rotations, so the differents between object 1 and object 2.
But i gave the object in the middle (here object 2) the rotation (0, 0, 0)! So there arent differents between the rotation, but look at the pics, there is an error :/

Код:
SampObject object = SampObject.create(1253, new Location(player.getLocation().getX() + 10.0f, player.getLocation().getY(), player.getLocation().getZ() + 0.85f), new Vector3D(0, 0, 0));
		houseData.getObjects().forEach((houseDataObject) -> {
			float x1 = houseDataObject.getLocation().getX()-normalX;
			float y1 = houseDataObject.getLocation().getY()-normalY;
			float z1 = houseDataObject.getLocation().getZ()-normalZ;
			float rX1 = houseDataObject.getRotation().getX();
			float rY1 = houseDataObject.getRotation().getY(); 
			float rZ1 = houseDataObject.getRotation().getZ();
			
			houseDataObject.attach(object, x1, y1, z1, rX1, rY1, rZ1, true); //TRUE for the forced object rotation (stands for 1)
		});
Alf21 and thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)