When using the lookAt() function to point towards an entity I get unexpected behaviour
does anyone know a solution to this?
(the entities it’s trying to point at are level relative to the knob’s orientation)
When using the lookAt() function to point towards an entity I get unexpected behaviour
does anyone know a solution to this?
(the entities it’s trying to point at are level relative to the knob’s orientation)
Hi @Mavros!
Can you show the code you use for this function?
Make sure the entity has no dynamic rigidbody.
this.knob.lookAt(this.targets[this.currentTarget].getPosition());
both the knob and the targets don’t have any rigidbody components on them
Alright. Please note that lookAt()
works backwards, so you probably also need to rotate the enity 180 degrees.
it’s working now