- Code: Select all
function onInit
SpinnerID = entity.getEntityIDFromTag("Spinner_1");
end
function postInit(objID)
SpinnerArmBodyID = physics.getBodyID(SpinnerID);
end
function onUpdate(objID)
w,x,y,z = entity.getWorldOrientation( entity.getIDFromTag("Spinner_1") );
entity.setWorldOrientation( SpinnerArmBodyID, w, x, y, z );
end
This doesn't work because I can't find a physics command to rotate the body...I have a spinning object that the player has to run by as it is spinning...I need the physics body to spin with the entity...I guess I will need to attach a trigger to the object to detect a collision...I am not sure if this is the best way to do this or not...Any help or suggestions will be appreciated...CO