Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Free flying upside down and all around......
Free flying upside down and all around......
2002-01-01, 1:41 PM #1
I've come up with a way to have 360 degree headpitchable flight. In a nutshell, I set the min/max headpitch to -2billion and 2billion respectivly, set the geomode of the player to 0 (cuz if you rotate 360 degrees, kyle does, well, impossible things and it looks funky) and I create a custom actor in place of kyle. I have a ghost firing every 0.01 seconds from the player to get the "proper" LookVector, and set the LookVector of the custom actor to it. (other things are set up so the actor looks like it's the player, animations, model, ect ect)

My problem is, whenever I'm upside down the model will be upside down. (the view is upside down, and the actor should be upright, but it's not) I know that setting the lookvector of it is messin with it, but I have no idea how to fix it, and don't know of another method that would achieve the same effect of flying 360 degrees.... =\

[edit]Man, I confused myself when I read my explanation of the upsidedownness. @_@ It should make sense now. [http://forums.massassi.net/html/biggrin.gif][/edit]

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!

[This message has been edited by Hell Raiser (edited January 01, 2002).]
-Hell Raiser
2002-01-01, 4:19 PM #2
I have a feeling you've already found the solution to your problem, and its probably nicer than this but maybe try something like this in pulse:

Code:
       dummy = FireProjectile(player, projectile, -1, -1, '0 0 0', '0 0 0', 1, 0x20, 45, 45); 
       LOSVEC = GetThingLVec(dummy);
       if(VectorZ(LOSVEC) <= 0)
       {
       SetThingLook(TheActor, VectorSet(VectorX(LOSVEC), VectorY(LOSVEC), -0.5)); // Change -0.5 to the amount you want the TheActor facing downward.
       }
       else
       {
       SetThingLook(TheActor, LOSVEC);
       }
       Return;


What im trying to do is when the Z portion of the players look vector is below Z, you set the TheActor's LookVector to some generic down vector rather than the actual LookVector.

Actaully I'm wondering why you dont like the TheActor Upside down? When Superman, Airplane, ect dive to the earth they are generally upside-down. It's just that they hopefully pull up at the last minute.
- Wisdom is 99% experience, 1% knowledge. -
2002-01-01, 4:36 PM #3
[http://hellraiser64.virtualave.net/upsidedown.jpg]

See how the camera is upside down? (thats a waterfall with a pool of water at the top, err, bottom rather) The actor is rightside up, when he should be upside down. That's the problem. (shoulda thought of a screenie sooner [http://forums.massassi.net/html/redface.gif] )

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!
-Hell Raiser
2002-01-01, 5:07 PM #4
Ug, This is a horrible solution but the only one I can think of. If you are moving with the TheActor...

TeleportThing(TheActor, player);

I *believe* when something is teleported it takes on the orientation of the thing its being teleported to. Im not sure how you would implement this since if you did this frequently this would ruin the whole effect.
Maybe a teleport every 3 seconds wouldnt be noticed.
- Wisdom is 99% experience, 1% knowledge. -
2002-01-01, 5:23 PM #5
Well, the player isn't rotated at all, the torso is. I'm gonna see if I can rework it with SetThingRotVel()......

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!
-Hell Raiser
2002-01-02, 6:01 AM #6
SetThingLook() sets the orient, not the headpitch, of a thing. Why do people mistake
the z axis of the lookvector for the headpitch? Just try:

SetThingLook(player, VectorSet(0,0,0.5));

That will make the player's feet go in the
air and will not affect headpitch.

----

I'm not really sure what you're trying to do, HR. Perhaps you could explain it again?
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-02, 8:50 AM #7
It iss hard to explain, so let me show you with some picatures. [http://forums.massassi.net/html/biggrin.gif] (shoulda done this in the first place)

This is what happens if all you do is modify the head pitch to the min/max int values (-2billion to 2billion some) and look upside down.

[http://hellraiser64.virtualave.net/UD1.jpg]

It looks like the player does some impossible feats if you keep rotating around.

--------------------

Here's what it looks like in 1st person:

[http://hellraiser64.virtualave.net/UD5.jpg]

The view is perfect in 1st person! In 3rd person it "corrects" the camera so sky is up, and ground is down.

--------------------

Notice in these pictures (still in 1st person, explained below) that the headpitch is dead center, looking both up, and down.

[http://hellraiser64.virtualave.net/UD3.jpg]

[http://hellraiser64.virtualave.net/UD2.jpg]

It's important to remember that this is NOT the player! I set the player geo to 0, create a custom actor template, and ParseArg the eyeoffset. (so you can see the actor and so the view isn't "corrected") This is why the headpitch is dead center. I set the LookVector of the actor to a ghost that is fired from the player, and also set the Pos and Vel of it in a Pulse(0.01). (thats how I get moving animations out of it [http://forums.massassi.net/html/smile.gif])

--------------------

In this last picture, as you can see, sky is down, ground is up, BUT, the actor is "corrected" like the 3rd person view is. It's feet are pointing towards the ground, when they should be pointing towards the sky.

[http://hellraiser64.virtualave.net/UD4.jpg]

--------------------

Well, this is the best that I can explain it. I know the problem is SetThingLook because that just tells the thing to look in a direction, it doesn't take in account rotation and the lot.

I might have to rework it with SetThingRotVel, cuz I can't think of anything else that could fix this problem.....

[edit]Yikes, I had some pictures in the wrong places! That woulda really confused everyone[/edit]

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!

[This message has been edited by Hell Raiser (edited January 02, 2002).]
-Hell Raiser
2002-01-02, 11:26 AM #8
Are you trying to set the lookvector of this actor with SetThingLook()? I think that's
your problem. SetThingLook() sets the orient of a thing and doesn't affect headpitch.

Also, GetThingLVec() returns the correct orient of a player. The reason the z axis is
zero is because the player stands upright.

When a projectile is fired from the player, it is given the lvec of the player's torso,
not the true lvec of the entire player.

AISetLookPos() (as Seifer pointed out) can be used to set the headpitch of an actor, but
you'd have to get a position to look at.

Hope that helps [http://forums.massassi.net/html/wink.gif]

------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx

[This message has been edited by SaberMaster (edited January 02, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-02, 12:28 PM #9
I don't want to set the headpitch of the actor at all. [http://forums.massassi.net/html/tongue.gif]

I get the headpitch of the player by getting the LVec of the ghost, then I set the orientation (not headpitch, don't wanna do that) of the actor to that. (using SetLookVector())

In the last picture, the actors feet should be at the bottom, and his head at the top. Thats the problem.

[This message has been edited by Hell Raiser (edited January 02, 2002).]
-Hell Raiser
2002-01-02, 1:28 PM #10
Try SetThingLook(ActorThing, GetThingLVec(Player)); In the pulse. It should rotate the entire body of the new, attached actor to the headpitch of the player.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-01-02, 1:31 PM #11
BTW, I have two suggestions for the TC.

1. Downsize the HUD a little (may be your res), it looks too big and blocks the view.

2. Make EVERYTHING 8-bit. Lots of that stuff looks 16-bit, and trust me, if you properly convert to 8-bit with proper CMPs, you won't notice much of a difference, and your framerate will literally double.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-01-02, 1:49 PM #12
Emon, that wouldn't work. It doesn't take in account player headpitch, therefore, I would only be setting the actor looking left/right, and up/down would be straight ahead. It doesn't take into account if the thing is upside or not either. =\

1. That hud is for people who can run JK in the larger resolutions. (I like it in 640*480) There will be a more compact hud to choose from for those who want it.

2. Everything IS 8-bit! [http://forums.massassi.net/html/biggrin.gif] Some of the levels are 16bit, but that's it.

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!
-Hell Raiser
2002-01-03, 10:28 AM #13
I think I begin to see what you're trying to do, HR. But what do you mean that the camera is "corrected"?

Let me do some testing...

------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-03, 1:25 PM #14
*Several hours later*

I'm guessing that JK cannot display actors upside down. That's your problem, right?

The player can look upside down with headpitch; his torso just keeps rotating around and around.

My theory:
Picture a globe around an actor. When the actor looks above the arctic circle(with
lvec, not headpitch), he will be rotated 180 degrees to the other side of the globe. Then
if he continues to look up, he will be looking farther down on the other side of the
globe.

Of course, I could very well be wrong, but that's all I can think of.

[This message has been edited by SaberMaster (edited January 03, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-03, 2:23 PM #15
I've been in a JK game and got hax0red by a hack that flipped me upside down and all around. I'm sure it's possible.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-01-03, 2:55 PM #16
Yea, with SetThingRotVel, that'll make you go upside down and every which a way. [http://forums.massassi.net/html/smile.gif]

Like I've said, I'm gonna try reworking it (somehow, not sure yet) with SetThingRotVel.

------------------
-Hell Raiser
Cogging type person that does, umm, stuff?
"Free, your, mind."
DBZ: TDIR has a new home!
-Hell Raiser
2002-01-04, 6:11 PM #17
hmm, I remember making a hack a while ago (gasp, hax!!!) and if i remember i had this same problem. you should try:

thing = creatething(template blah blah . . .
ghosttemp = fireprojectile(player, ghost, blah blah. . .
teleportthing(thing, ghosttemp);
attachthingtothing(thing, ghosttemp);

if i remember correctly that is what i used to flip victim upside down and what not, kind of like your free flight but much slower and choppy (lag)

if that doesn't fix it, I might have another idea

sorry about the incomplete lines but im in a hurry lol
[edit] dang, I re-read your post and realized the fireprojectile woudln't work because of the headpitch not actually being what you wanted once you where upside down, unless it is and im just stupid hehe
[/edit]

[This message has been edited by Maggot (edited January 04, 2002).]
2002-01-04, 6:54 PM #18
Oh, yeah... Let me rephrase that slightly:

..JK cannot display actors upside down with a lookvector.

------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!