Raised This Month: $ Target: $400
 0% 

Getting an origin with angles and distance


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EagleEye
New Member
Join Date: Jul 2008
Old 06-02-2009 , 11:21   Getting an origin with angles and distance
Reply With Quote #1

Hey I am trying to create a sprite between a player and where the player is aiming. As it is now, it creates a sprite all the way across the map, so I want to limit the distance the sprite can be created.

What I have now is
Code:
new pOrigin[3],tOrigin[3]
get_user_origin(id,pOrigin)
get_user_origin(id,tOrigin,3)

message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte(TE_BEAMPOINTS)
    write_coord(pOrigin[0])
    write_coord(pOrigin[1])
    write_coord(pOrigin[2])
    write_coord(tOrigin[0])
    write_coord(tOrigin[1])
    write_coord(tOrigin[2])
What I think I need is some kind of function that will follow angles that you pass it for a distance you pass it and return a origin or vector or something. Is there any such function or any ideas for how to create one?
EagleEye is offline
 


Thread Tools
Display Modes

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 14:04.


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