rotation to Angle of another actor retaining his position
Hey guys, I'm impressed with the forum's,and encourage me to write and I'm stuck with my actors, I need the roll canon pointing to another while retaining his position actor who is moving around the scene,es decir que lo apunte sin cambiar la posicion solo que gire hacia donde se mueva...
Thanks for your answers
Thanks for your answers
Comments
Thanks for your answers
First off you want to create 4 real attributes. Call them canonbaseX and canonbaseY , enemyX and enemyY(or whatever you want)
In the enemy you want the canon to rotate towards have 2 constrain attribute behaviors and constrain attribute enemyX to self position X and constrain attribute enemy Y to self position y
In the position actor who moves around, constrain attribute canonbaseX to self.position.X and constrain attribute canonbaseY to self position Y
Now in the top part of the canon you want to rotate constrain attribute self position x to canonbase x and constrain attribute self position y to canonbaseY
That will have it move around with it.
Then finally have another constrain attribute behavior in there and constrain attribute self rotation top vectorToAngle(self.position.x-enemy.x,self.position.y-enemy.y)
or you can use a rotate to position behavior and rotates towards the enemyX and enemyY attributes
Hope that helps
and in the top of the canon, I could spell that please...???
Thanks for your quick response .......
Help I try to do that, but i don't now where and which orden...
Thanks....