I have trouble with the eye offset of the player, which is attached to another object in the case, that this object rotates on all axis.
Code: Select all
player:set_attach(self.object, "", {x = 0, y = 14, z = 4}, {x = -90, y = 0, z = 0})
player:set_eye_offset({x = 0, y = 0, z = 0})
player:set_look_vertical(-math.pi/2)
player:set_look_horizontal(1.75*math.pi)
When I use pitch rotation, the player is shown in the right place, but eye offsets look to be unaffected by rotation, so the eye starts to rotate around some point, probably 0, 0, 0, and go under the seat, to of the object, the player is attached to.
Is there some way to fix this?
Spoiler