03.06.2015, 14:26
(
Последний раз редактировалось Alf21; 10.01.2016 в 18:17.
Причина: Fixed Bug.
)
//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 :/
Alf21 and thx
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) });