adding( x + x, y + y)
by rennie moffat · in Torque Game Builder · 04/20/2010 (4:10 pm) · 4 replies
Hi,
is there a way beyond t2dVectorAdd to add a couple of vectors in game? For instance, could I say...
The reason I ask is because when I setPositions, with an object position + offset I need to set, or get x and y of the object then x and y of the offset. I would prefer if I could just somehow add the two vectors......
I guess, just t2dVectorAdd eh? set to a variable.
::::]
is there a way beyond t2dVectorAdd to add a couple of vectors in game? For instance, could I say...
%this.owner.setPosition(%this.owner.position + %this.xyoffset);
The reason I ask is because when I setPositions, with an object position + offset I need to set, or get x and y of the object then x and y of the offset. I would prefer if I could just somehow add the two vectors......
I guess, just t2dVectorAdd eh? set to a variable.
::::]
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
Torque 3D Owner Nicolas Buquet