IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Camera/Player Looking At Position

 Vector3 Coordinates of player looking
 
Bodgan  
Posted: Tuesday, May 22 2012, 14:26
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 22, 2012

XXXXX



Hi to all! smile.gif I'm new here in GTAForums even if i've followed this network for a long time smile.gif
Though, I'm not new in programming/scripting world. I know many languages and recently I've started scripting for GTA IV ( in .NET C# ) because of pure passion for it.

After many researches, here as well, I've decided to come here to ask for some help. My problem is simple: I would like to get a Vector3 coordinates of the "something" the player is looking at in world coordinates. So if I look at a building, I would like to get the X, Y and Z at the very point I'm looking on the building's face. If I look at the sky I should get something big or nothing, that's the theory.

I've browsed, with the help of Visual Studio and a .chm file, every function I could of many objects like Game, Camera, Wolrd and Player. I coundn't find nothing that could help me. After this, I tried to get what want with some math ( trigonometry and Pythagoras) but nothing come up.

So, now that I've explained everything it's up to you helping me out smile.gif Thanks forward smile.gif
PM
  Top
 

 
lindsayslorach  
Posted: Tuesday, May 22 2012, 16:48
Quote Post


Rat
Group Icon
Group: Members
Joined: Dec 26, 2006

au.gif

XXXXX



I'm not sure how you would do that, maybe shooting a ray of some sort. It's probably a good idea to join the GTA IV .Net ScriptHook IRC channel, you'll most likely get a quicker responce, and there are a few talented people in there most of the time.

I think you can click my signature to join, if not I'll post the link to the channel.
PM
  Top
 

 
hardsty1e  
Posted: Tuesday, May 22 2012, 17:01
Quote Post


Rat
Group Icon
Group: Members
Joined: May 2, 2009

XXXXX



PM
  Top
 

 
Bodgan  
Posted: Tuesday, May 22 2012, 17:13
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 22, 2012

XXXXX



Just like that yes =) That is kinda perfect =)
EDIT @lindsayslorach: However thank you for this. I've join it =)

This post has been edited by Bodgan on Tuesday, May 22 2012, 17:20
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG