Ox.Engine.Component missing definition

May 13, 2010 at 12:10 AM

hi all, 

i was trying the example in the documentation and it was creating an ox script 

 and in the part of the code in 

{And add the following code into Spinner’s UpdateHook method –


// add spin

spin += 0.05f;

// set the scripted component's orientation according to the amount of spin

Component.Orientation = Matrix.CreateRotationX(spin);


it gave me this error

Error 1 'Ox.Engine.Component.OxComponent' does not contain a definition for 'Orientation' and no extension method 'Orientation' accepting a first argument of type 'Ox.Engine.Component.OxComponent' could be found (are you missing a using directive or an assembly reference?) 


Can anybody help me regarding this

May 13, 2010 at 11:49 AM
Edited May 13, 2010 at 11:50 AM

Looks like you overlooked the part where the scripted component is declared to be a SceneComponent instead of an OxComponent -


"First thing to do with the script is to specialize to work with scene components. To do so, change its generic class parameter from OxComponent to SceneComponent. The class signature will look like this –

/// <summary>

/// Implements a script that spins a scene component.

/// </summary>

public class Spinner : ComponentScript<SceneComponent>"



May 13, 2010 at 3:44 PM

Thanks it worked , Is there any tutorials that i can use? as there are very few ones not enough to build a good game.

May 13, 2010 at 9:34 PM

well, building a good game very rarely comes from a tutorial, least of all the finished product being someone elses idea.

i've written a few tutorials but they are out of date now as the engine has evolved since they were written.  Ill try and update my "oxanoid" tutorial to work with the latest release.

it has the basic principles of creating a game with Ox in it.

but dont hold your breath. had a great day at work smashing lumps out of my hands with hammers and suchlike. :D