• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Actor Message - 3D Rotation

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
253
I solved it!

I am UBER yayface! I'm so happy!

Basically I realised that the Set Rotation: Forward (X,Y,Z) & Up (X,Y,Z) were already offsets. Going with the whole principle of vectors I imagine, though I slept through maths.

Forward does indeed refer to the offset point the unit pokes its snout at, and the Up vector like-wise refers to which direction a helicopter lifts off.

So all I had to do in order to get my unit to look straight up is this:

Set Rotation: Forward (0,0, 100/whatever) & Up (0,0,0).

Which changes only the pig snout to point at Z point 100 from its position. You can replace 100 with anything, the angle of snout pointage won't change.

If I want to get my piggy to point in any other 3D direction, I imagine I will be employing good ol' Trigonometry in order to get my Forward X & Y.

Just off the top of my brain, though I might not be thinking it through properly, I would assume that by altering the Up (X,Y,Z) will only spin the unit around tornado style? Since I assume that the unit position does not change?
Will have to verify this.

--------------------------------------------------
EDIT: Okay I had a fiddle modifying the up vesctor, and seriously, what the heck does it do? I had three theories which I tested and rejected. A) It was a perpendicular vector. B) It modified the unit's orientation. E.g, X = Barrel Rolls, Y = Rotate, Z = Flips, or something of that order. C) A vector that can go off from the unit at any tangent, like the forward.

But I tried all these, and you know what happened? Nothing. Seriously, no matter what I did, the only thing that ever happened is it orientated south. Fully gay.
--------------------------------------------------


But anyhow, if anyone else made similiar retardface mistakes, hope that helps! :D Or ask me if you have any questions. XD

:ogre_datass: Booyah.

(THE BELOW POST CAN BE IGNORED, IT WAS PART OF MY ORIGINAL LINE OF QUESTIONING. I'M JUST KEEPING IT IN, IN CASE IT HELPS CLARIFY.)
 
Last edited:
Level 7
Joined
Jun 16, 2008
Messages
253
Yayface-ish!

I've worked around the majority of the problem, which makes me go woot! The issue wasn't that it wasn't grabbing the Actor or Actor model, it was simply what it's doing with the little Actor.

I also realise this is probably quite an advanced thinga-ma-jig for a lot of people, so I'll try to do a little expose' on my brain learnage, in case other people find it helpful. The principle of defusing Bombs. XD I'll try to make it a little easier to read than my usual brain leakage of mental diarrhea. :D Bolds FTW.

This is my functionality of the function as it stands now.

ACTOR ORIENTATION

1. What I was trying to do.

Basically, I was trying to do the simple task of making my Unit look up.

2. Where I went.

I used the Function 'Send Actor Message' to Actor From Unit. (Which, by the way, I found out actually works. I was just being a fail-tard for reasons I will explain.)

The Message was basically: Set 3D Rotation - Forward (X,Y,Z + 1000 of Target Point) and Up (X,Y, 0 of Unit)

3. Why I did that.

The Target Point is a Point I calculated as a perpendicular angle from a Source Point to the Unit, effectively creating a surface oriented in 3D, so for example if I were remaking an AvP game it would allow me to have those little alien bastards stick to walls and ceilings. At least, this is the idea.

For this function, I was simply creating a test to get my Unit to stand at 90 degrees, standing on its tail in effect.

Originally, I had thought that the Forward vector referred to the point that the unit would orient its nose toward, and that the Up vector would orient the top or spine, so that you could make it do fun little tornado spins if you're feeling Street Fighter. XD

Because of this, I thought that the easiest way to perform my test was to make the Up Vector any random XY point (I just put in Unit position) as long as the Z was 0.

Then I could make the Forward Vector at a point above it, and... it would work? Making my unit point its little noggin in the right direction?

4. What Happened.

Using the above, even if I use only the Position of the Unit for Forward and Up Vectors, and make the Forward Vector Unit Z + 1000, I don't think its ever quite pointing straight up, though its close.

5. Concluding Thoughts

I'm studying math for the first time ever-ness really, so forgive me for my lack of knowledge in these areas.

I shouldn't have to do Z + 1000 to get it looking upward. I just want to take Unit and 3D Point and get the Unit to look at 3D point.

I reckon I've failed to understand the principle of how the vectoring of this function works. I know the unit doesn't move, only its orientation according to the calculated vector.

Maybe I'm taking the unit position into account when I shouldn't be, that an entirely new position is arbitrarily created when Vectoring. Perhaps I'm assuming that the Unit is automatically sitting on the position of the axis, when it fact its sticking its 90 degree butt somewhere out in the desert, changing the orientation angle from Point on ground to Point in Air.

Or instead of 'Setting' rotation, it is 'Modifying' the current Vector orientation of the unit, which seems to be the general effect.

* * *

It's rather confusing to me at the moment, so if anyone DOES know where I went wrong, don't be shy. :D

I hope I explained that well enough.

I will continue to update this post as I figure it out, as I haven't found the answers anywhere else, and it may be helpful to someone.

If I figgers it out, I'll edit the initial post, and the moderators can slap a big happy Solved on it. XD
 
Status
Not open for further replies.
Top