Get Map Plane (Surface) Direction
1 Attachment(s)
I have Float coordinates (XYZ) on a map, lying on some physical plane of the map. How can I obtain the direction (vector?) of the plane on which this point is located? For example, if it's a regular flat floor, the direction is strictly vertical (90° upward). Thank you.
|
Re: Get Map Plane (Surface) Direction
Always null {0,0,0} since it is not moving.
|
Re: Get Map Plane (Surface) Direction
You need to execute a traceline from a point in/to a wall/floor/ceiling/surface and then collect the required data from the tracehandler according to what you need which is TR_vecPlaneNormal
|
Re: Get Map Plane (Surface) Direction
Quote:
|
Re: Get Map Plane (Surface) Direction
Quote:
I work with cannons (func_tankmortar) on the crossfire map (Half-Life). Specifically, I intercept env_explosion: At the moment of its call, I can determine that it was produced from the cannon (func_tankmortar), the coordinates, and angles of the cannon (if I'm doing everything correctly). Therefore, having the final coordinates of env_explosion, I can call EngFunc_TraceLine (with subsequent TR_vecPlaneNormal), but this code doesn't work. Code:
|
Re: Get Map Plane (Surface) Direction
Quote:
engfunc(EngFunc_TraceLine, originet, angles, IGNORE_MONSTERS, 0, trace) The 2nd parameter here (angles) should be replaced with the end coords of where the Traceline should go AKA destination coordinates... The 4th parameter here ( 0 ) should be replaced with the entity to ignore which in your case is inflictor since we don't need the traceline to stop at the begining... |
Re: Get Map Plane (Surface) Direction
Ok when I saw (vector?) that got me. TR_vecPlaneNormal... looks like I need to brush up on my calculus. Never have I seen a need for that. What are you trying to accomplish by intercepting env_explosion? There are plugins that can make one view the course with cords by attaching view all the way to blocking the boom by having the crowbar drawn already as the shell approaches.
|
Re: Get Map Plane (Surface) Direction
1 Attachment(s)
Quote:
Code:
Code:
OWNER: 277 |
Re: Get Map Plane (Surface) Direction
Good luck!
|
Re: Get Map Plane (Surface) Direction
There, this should give out the needed results...
Spoiler
|
| All times are GMT -4. The time now is 00:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.