You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
function SeekTarget(target as vector3, location as vector3, velocity as vector3, maxspeed as float, ID)
desired as vector3
steer as vector3
maxforce# = 1.00
desired = SubtractVector3(target, location)
desired = NormalizeVector3(desired)
desired = ScaleVector3(desired, maxspeed)
steer = SubtractVector3(desired, velocity)
steer = limitForce(steer, maxforce#)
location = AddVector3(steer, location)
// how to get myself to point towards location
SetObjectPosition(ID, location.x, location.y, location.z)
The author of this post has marked a post as an answer.
Go to answer
Login to post a reply