Position arithmetic
by UCF_0017 · in Torque Game Engine · 09/05/2006 (10:21 am) · 4 replies
I am saving off the position information of an object in the world to a variable. Then, I am making the AI player move to that position. Unfortunately, the AI player is covering the trigger position I need to be accessible for Forte to walk on. So what I really need is the AI player to be able to move to the position of the trigger shifted in the X by a certain amount (in this case, let's say 20).
Right now, I have the following:
%targetObject = "MissionGroup/stageSoundTrigger";
%dest = %targetObject.position;
%dest.x = %dest.x - 20;
$AriasAlgo.goToDest(%dest, false);
Unfortunately, this is not working.
Neither did this:
%targetObject = "MissionGroup/stageSoundTrigger";
%dest = %targetObject.position;
%dest = %dest - "20 0 0";
$AriasAlgo.goToDest(%dest, false);
What should I be doing to get the result I want?
Right now, I have the following:
%targetObject = "MissionGroup/stageSoundTrigger";
%dest = %targetObject.position;
%dest.x = %dest.x - 20;
$AriasAlgo.goToDest(%dest, false);
Unfortunately, this is not working.
Neither did this:
%targetObject = "MissionGroup/stageSoundTrigger";
%dest = %targetObject.position;
%dest = %dest - "20 0 0";
$AriasAlgo.goToDest(%dest, false);
What should I be doing to get the result I want?
About the author
Torque Owner UCF_0017