Game Development Community

Space Warrior Tutorial Help?

by Michael Huniu · in Torque X 2D · 08/08/2008 (8:03 am) · 2 replies

Help!
I tried following the Documentation and Reference code under the tutorial for Space
Warrior.
I put the following code into my XNA under Processing Tick
if (move != null)
{
// control like asteroids: control rotation velocity, but rocket-like
acceleration.
SceneObject.Physics.AngularVelocity = move.Sticks[0].X * _turnSpeed;
Vector2 direction = T2DVectorUtil.VectorFromAngle(SceneObject.Rotation);
SceneObject.Physics.Velocity += move.Sticks[0].Y * _acceleration
* dt * direction;
}
I got the following error message:
Error 1 The type or namespace name 'Vector2' could not be found (are you
missing a using directive or an assembly reference?) C:\Documents and Settings\Compaq_Administrator\My
Documents\Visual Studio 2005\Projects\SpaceWarriorTutorial\Game\ShipControlsComponent.cs
105 17 Game

Can you help?
Thanks,
Michael

#1
08/08/2008 (8:18 am)
Add this at the top of your page:

using Microsoft.Xna.Framework;
#2
08/08/2008 (2:50 pm)
David,
It worked! Thanks!!!