Welcome to CMM

We've created a Custom Map Makers Discord channel, if you'd like to join us on the CMM Discord Channel, click here

Quaternions

General mapping discussions
RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Quaternions

Postby RedSnappa » Sat Dec 10, 2011 5:52 am

I am still having the problem where my portal cameras are rolled over. Basically, if the portal camera and portal surface entities do not point in the same direction, the portal camera rolls over by the same number of degrees. Based on the solutions I have tried that haven't worked, I am beginning to think this is a gimbal lock problem. Which leads me to propose the following: Is there any way I can use quaternions in GtkRadiant to perform a spatial rotation?
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Quaternions

Postby johnnyenglish » Sat Dec 10, 2011 6:34 am

I think you can use the angles key on the camera, not sure, haven't checked.

key value
angles roll pitch yaw

User avatar
DagF
Posts: 276
Joined: Thu Aug 18, 2011 8:40 am
Location: Norway
Contact:

Re: Quaternions

Postby DagF » Sat Dec 10, 2011 10:52 am

Portal camera. This camera is used to project its view onto a portal surface in the level through the intermediary of a misc_portal_surface entity. Use the "angles" key or target a target_position or info_notnull entity to set the camera's pointing direction.
-------- KEYS --------
angles : this sets the pitch and yaw aiming angles of the portal camera (default 0 0). Use "roll" key to set roll angle.
target : point this to a target_position entity to set the camera's pointing direction.
targetname : a misc_portal_surface portal surface indicator must point to this.
roll : roll angle of camera. A value of 0 is upside down and 180 is the same as the player's view.
notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.
notteam : when set to 1, entity will not spawn in "Teamplay" and "CTF" modes.
notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode).
-------- SPAWNFLAGS --------
SLOWROTATE : makes the portal camera rotate slowly along the roll axis.
FASTROTATE : makes the portal camera rotate faster along the roll axis.
-------- NOTES --------
Both the setting "angles" key or "targeting a target_position" methods can be used to aim the camera. However, the target_position method is simpler. In both cases, the "roll" key must be used to set the roll angle. If either the SLOWROTATE or FASTROTATE spawnflag is set, then the "roll" value is irrelevant.

So set the roll key to a 180 and if you want to aim it the rgith way without playing to much with the numbers youse a target_position.

Hope this helps ;)
Image

RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Re: Quaternions

Postby RedSnappa » Sat Dec 10, 2011 1:02 pm

Tried that already. Not working. The roll is setting itself equal to the difference in the angles of the portal surface and portal camera. The only thing I haven't tried is an angles key on the portal surface.

EDIT: I looked at this again and it seems that the roll key is working. I thought I had tried it but maybe I didn't. I still want quaternions though. It is a better way to perform rotations and avoids the gimbal lock problem.
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem


Return to “Mapping Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests

cron