I am able to use AttachSetRotation, using hard coded numbers :
-0.7071, 0, -0.7071, -0.7071, 0, -0.7071
which makes it face about 45 degrees in the air at some odd rotaion
or
0, 0, 0, 0, 0, 0
which makes the turret face squarely towards the middle of the side of the map.
Anyways, the question:
How do I create variables to take the camera position for example, and convert it into numbers AttachSetRotation undertsands?
I currently use two sets, the first is Getpolar (of camera yaw) and the second is GetPosition of Unit...
But it wont take those numbers when running, the turret just sits still.
(I have tested the variables, they are actively updating, Ive also used them to face a unit before and worked fine... So im sure its some sort of conversion I need.
I should explain the events are fine as I am able to move the turret via HARDCODED values. Im just trying to figure out how to get the camera angle/rotation into compatible numbers that AttachSetRotation accepts.
I noticed the values that I sent hard coded are very small (like 0.7071) and the camera values I get are much bigger like 60 at some views
Might be due to camers also having a magnitude away from the point of origin to zoom while that trigger only cares about the rotation so only used 1 to (-1).
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I am able to use AttachSetRotation, using hard coded numbers : -0.7071, 0, -0.7071, -0.7071, 0, -0.7071 which makes it face about 45 degrees in the air at some odd rotaion or 0, 0, 0, 0, 0, 0 which makes the turret face squarely towards the middle of the side of the map.
Anyways, the question: How do I create variables to take the camera position for example, and convert it into numbers AttachSetRotation undertsands?
I currently use two sets, the first is Getpolar (of camera yaw) and the second is GetPosition of Unit... But it wont take those numbers when running, the turret just sits still.
(I have tested the variables, they are actively updating, Ive also used them to face a unit before and worked fine... So im sure its some sort of conversion I need.
Could you send a pic showing how you set up the events for the attachment set roataion event?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I sent the map via pm if you dont mind.
I should explain the events are fine as I am able to move the turret via HARDCODED values. Im just trying to figure out how to get the camera angle/rotation into compatible numbers that AttachSetRotation accepts.
I noticed the values that I sent hard coded are very small (like 0.7071) and the camera values I get are much bigger like 60 at some views
@ibebusiness: Go
Is there anyone else who understands the data AttachSetRotation accepts?
Might be due to camers also having a magnitude away from the point of origin to zoom while that trigger only cares about the rotation so only used 1 to (-1).
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I am not using camera input right now, just looped "real" integers.
I explained the behavior here in detail, and provided a video http://forums.sc2mapster.com/development/triggers/21677-working-attach-set-rotation-no-fake-attack-aim/#p4
@ibebusiness: Go
Got it working, here is a higher quality vid showing it.
Can someone please explain how to use "attachsetrotation" STEP BY STEP, from the beginning, without assuming I know certain steps please? Thanks