MOving an object based upon its rotation
by \"Robert Jaramillo\" · in Torque Game Builder · 02/19/2010 (3:40 am) · 3 replies
Hello, you guys
I have an object that is rotating around my player right now which is what I wanted. However when I fire this object I simply set his Y velocity so it can begin to move but I don't think that it is right? anyways I would take any suggestions you folks have for out in a straight line based upon its current angle.
I have an object that is rotating around my player right now which is what I wanted. However when I fire this object I simply set his Y velocity so it can begin to move but I don't think that it is right? anyways I would take any suggestions you folks have for out in a straight line based upon its current angle.
#2
function Harpoon::Fire(%this)
{
%this.bIsReadyToFire = false;
%this.setForwardMovementOnly(true);
%this.setForwardSpeed(6);
}
02/19/2010 (10:26 am)
Hello, I have tried what you suggested and I get an invalid parse error for some reason. If my object is a t2dsceneObject what would the reason be for this. Posted below is the function as I am using it function Harpoon::Fire(%this)
{
%this.bIsReadyToFire = false;
%this.setForwardMovementOnly(true);
%this.setForwardSpeed(6);
}
#3
function Harpoon::Fire(%this)
{
%this.bIsReadyToFire = false;
%this.setForwardMovementOnly(true);
%this.setForwardSpeed(20);
}
Also
02/19/2010 (10:29 am)
Hello, I have tried what you suggested and I get an invalid parse error for some reason. If my object is a t2dsceneObject what would the reason be for this. Posted below is the function as I am using it function Harpoon::Fire(%this)
{
%this.bIsReadyToFire = false;
%this.setForwardMovementOnly(true);
%this.setForwardSpeed(20);
}
Also
Associate William Lee Sims
Machine Code Games
You can get more information at TDN: tdn.garagegames.com/wiki/TGB/Reference:_t2dSceneObject_Physics_Methods#setForwar...