• Set Constant Entity Velocity to a certain position.
    4 replies, posted
Hey guys, I'm trying to make it so i can give a prop a vector position and then have it move at a constant velocity, say 20, to that point. Currently I'm doing like Target is some entity... local phys = self:GetPhysicsObject() local position = Target:GetPos()-phys:GetPos() phys:SetVelocity(position*3) but the closer it gets to the prop the slower it gets. If anyone could help out that would be great.
local POS = (TG:GetPos() - PHY:GetPos()) local DIRECTION = POS:Normalize() PHY:ApplyForceCenter( DIRECTION*50 )
when i try to normalize it, it just becomes nil?
POS:GetNormal( ) Normalize doesn't return anything
Okay yeah getNormal works if you multiply it by a very large number.
Sorry, you need to Log In to post a reply to this thread.