I got a problem with SetRotation and tried all tricks I got in my pocket. The initial rotation works but thats it. I tried to rotate a model after it is created but seems to ignore it. The funny things is that SetPosition is working.
This how I create it:
void GameObject::Create(Vec3 position, Vec3 rotation)
{
//Create the player
obj = Pivot::Create();
obj->SetPosition(position);
obj->SetRotation(rotation);
obj->SetMass(5);
obj->SetPhysicsMode(Entity::CharacterPhysics);
//Create a visible mesh
objMesh = Model::Cylinder(16, obj);
objMesh->SetPosition(0.0f, 1.0f, 0.0f);
objMesh->SetScale(1, 2, 1);
}
Another place in the project I try to rotate the object (1) like this:
vGameObject.at(1).obj->SetRotation( Vec3(0.0f, 45.0f, 0.0f) );
But this however works:
vGameObject.at(1).obj->SetPosition( Vec3(-10.0f, 1.0f, 0.0f));
Is it a bug with LE or is it me that aren't doing something right? This is driving me nuts!
Please help!