From what I understand ApplyMouse() is just for setting the mouse
coordinates, but thanks for the suggestion Ian.

Sorry if I made this sound overly complicated. What I'm trying to do is make the marine player model look up and down when there is mouse movement, instead of side to side, since I've changed the perspective to a 2D Mario type view, the player's marine doesn't need to look left and right like in a top down view.

This is the code I'm looking at in the ComputeNewMarineFacing function

float flNewForwardX = ( flMarineGunOffsetY * vMarineToTargetFlat.y - flGunToTargetDistance * vMarineToTargetFlat.x ) / ( flMarineGunOffsetY * flMarineGunOffsetY - flGunToTargetDistance * flGunToTargetDistance ); float flNewForwardY = ( flMarineGunOffsetY * vMarineToTargetFlat.x + flGunToTargetDistance * vMarineToTargetFlat.y ) / ( flMarineGunOffsetY * flMarineGunOffsetY - flGunToTargetDistance * flGunToTargetDistance );

// New forward/right vectors in world-space along the XY-plane
Vector vNewForward( flNewForwardX, -flNewForwardY, 0 );
Vector vNewRight( -flNewForwardY, -flNewForwardX, 0 );

*pNewMarineFacing = vNewForward;

-----Original Message----- From: Ian Beecraft
Sent: Sunday, November 21, 2010 5:39 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Make mouse movement change the pitch instead of the yaw in asw?

Not done any modding for source in a while and done literally none for Alien
Swarm but if I remember correctly there was a function called ApplyMouse()
in in_mouse.cpp (or in_main.cpp) that should help you. I haven't looked at
the alien swarm code so it might be in a different file that extends on top
of these files.

On Sat, Nov 20, 2010 at 7:21 PM, Caleb Smith <mastersmit...@msn.com> wrote:

I’m working on a 2D Contra-style-platformer using ASW as my base. So far
I’ve changed the perspective and other little details, but the major issue
is getting the marine to look/shoot up and down instead of side to side. I’m
not entirely sure how I should go about changing this. Are the mouse
movements transformed into world space and then applied to the marine eye
angles? or is something else going on?

The code I’m looking at is in the TurnTowardsMouse and
ComputeNewMarineFacing functions. I also found that the pitch aspect of the marine’s angles isn’t being used at all and is stored in the roll aspect for
some reason.

Has anyone else run into the same problems or know how to fix this?
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to