|
Hello, My waypoint system does not rotate my enemy according to the direction of the waypoint. Here is my script:
Any suggestions why? Thanks. Ollie
(comments are locked)
|
|
You could add
right after you set rigidbody.velocity Edit (To set it to only rotate around x): This works - but how do I set it to only the X axis of the transform?
Dec 09 '10 at 11:11 PM
oliver-jones
(comments are locked)
|
|
Am sorry I dont know the answer to your question but here I need some help , =( I have a question to you "Oliver Jones" . Can you please tell me how to add enemy Ai , what tutorials you are following please give me some guidelines . Well, this is off topic - but my AI is, well - VERY basic. All it allows is for an enemy to talk to one point, and then to another - and then another. If you click on my profile, you will find my email - send me a message and I'll help you out.
Dec 10 '10 at 03:14 PM
oliver-jones
Dec 10 '10 at 03:14 PM
oliver-jones
(comments are locked)
|

I don't understand why the word rotation itself is not part of the script? What code section or specific line do you expect will do this for you?
I don't know how it insert it - or where.
I tried waypoint[currentWaypoint].rotation as well as position - but I get an error
well that code sets the rotation of the waypoint. You want to change the rotation of the transform that is being manipulated I assume. You could do extract the information of current point and destination point and calculate the angle with trig. using both transforms and their difference in respectively x,y,z