Raised This Month: $ Target: $400
 0% 

*Rotating* Player models.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-05-2005 , 16:33   *Rotating* Player models.
Reply With Quote #1

I have this ts map called ts_realitivity, which is based on that one painting where rooms are dis-oriented, such asyou can be walking normaly in one room, go thru a oddly-positioned door, and then your walking on the celing of a room. There are also chairs mounted to sides of walls, and if you spin your mouse around really quick, you have no idea which wall you are standing on

Anyways, how would you rotate a players model, so that instead of walking like this...
Code:
--------------------
|                 |
|         XXX     |
|         \X/     |
|         /X\     |
--------------------
^^ My ghetto screen, where the X's are the player orientation
*Dont blame me for my ghetto ASCII art, thats a guy with a head, body, arms and leg.)

to this
Code:
--------------------
|                  |
|\   / X           |
|X X  X            |
|/   \ X           |
--------------------
^^ more ghetto screen action. This time it is as if the player is walking on the left wall...

I'd imagine you could do this by setting some vectors, or stuff of the like, but I would think i would have to create entites where walls are that you can run like that or somethin, becuz i dont want people running 'on walls' without a wall being present.

I know that this post is confusing, but I can try to elaborate more if you dont know what I mean.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-05-2005 , 18:56  
Reply With Quote #2

avelocity.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-06-2005 , 12:48  
Reply With Quote #3

im like noob to vectors and such, could you explain?

also note that ive just finished geometry, and im pretty sure vectors are taught in trig.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-06-2005 , 20:15  
Reply With Quote #4

change entity's avelocity
and dont tell me how. its all in the inc files
Freecode is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-07-2005 , 12:51  
Reply With Quote #5

ok i saw avelocity in the engine .inc, but whats a vector?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-07-2005 , 14:34  
Reply With Quote #6

from somewhere i dont know where but from somewherei recall this vague info...
is a vector basically a direction in degrees, 0-360, where 0 is right and 180 is left?

Ok after more searching....

new fVector[3]
fVector[0] = 0
fVector[1] = 0
fVector[2] = 90

Would cause the player to rotate 90 degrees along the Z axis? (Im hoping the Z axis, when rotated, gives like a roll effect, like the effect of running against a vertical wall.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-07-2005 , 20:38  
Reply With Quote #7

*bump*
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-07-2005 , 22:28  
Reply With Quote #8

Try it, man. You can experiment, no need to ask every single question until you get the OK from us.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-07-2005 , 22:42  
Reply With Quote #9

i did expieriment, it crashses server.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-08-2005 , 01:31  
Reply With Quote #10

A vector is an array of [3], which takes float values. Each float value denotes a specific magnitude.

new Float:g_vector[3]
[0] = x
[1] = y
[2] = z

Since X Y and Z are map dependent, you cant really predict exactly what will happen in all cases. But generally, x is side to side, y forward and back, z up and down. Simple.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode