• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

TPS Find Terrain Camera pointing at

Status
Not open for further replies.
Level 8
Joined
Aug 4, 2006
Messages
357
[SOLVED]

So I have a working 3rd person camera and movement system. I'm planning on making a 3rd person shooter, of sorts. Now I am working on a system that finds the point of terrain that the camera is looking at, which I will later use in collisions between the ground and projectiles. My current method seems to be quite inaccurate, so I was wondering:
1) How can you get the absolute height of terrain/the camera/a unit?
2) If you have a working 3rd person shooter, how did you go about finding the intersection between the camera orientation vector and the terrain? I tried a simple loop that gradually moved a point farther from the camera, until the point's absolute z was less than the terrain's z.
 
Last edited:
Level 10
Joined
Nov 28, 2008
Messages
655
So I have a working 3rd person camera and movement system. I'm planning on making a 3rd person shooter, of sorts. Now I am working on a system that finds the point of terrain that the camera is looking at, which I will later use in collisions between the ground and projectiles. My current method seems to be quite inaccurate, so I was wondering:
1) How can you get the absolute height of terrain/the camera/a unit?
2) If you have a working 3rd person shooter, how did you go about finding the intersection between the camera orientation vector and the terrain? I tried a simple loop that gradually moved a point farther from the camera, until the point's absolute z was less than the terrain's z.


http://forums.sc2mapster.com/develo...gger-how-to-target-with-mouselook-tracelines/

He is pretty dang good at explaining his way of doing it.
 
Status
Not open for further replies.
Top