Jump to content

do player camera roll allowed?


photo

Recommended Posts

Hello

simple example where roll are not applyed to camera rotation in unigine script

Player P;

P = engine.game.getPlayer();

P.setWorldRotation(
	P.getWorldRotation()*
	(
		//quat(rotateX(5))//pitch - ok
		//quat(rotateY(5))//yaw - ok
		quat(rotateZ(5))//roll? not working
	)
);

what wrong here?

how to make camera rolling?

Link to comment

Hi, lightmap!

Are you using PlayerSpectator or PlayerPersecutor? They don't support roll in this way. Try to use PlayerDummy.
Or... You can apply roll right after player's node update. It will be works with any Players.

For example:

void render() // render method will be executed right after player's node update
{
Player p = engine.game.getPlayer();
p.setRotation(p.getRotation() * quat(0, 0, 10));
}


Best regards,
Alexander

  • Like 1
Link to comment
×
×
  • Create New...