vector::dot

This is the development community to discuss tribes mod coding or to ask questions.

Moderator: Moderators

1 Thu Feb 12, 2015 9:00 am

I'm writing a function that determines if players are on the correct side of the terrain.

Currently it looks up and down for the terrain, and checks if the terrain is right side up (rot == "0 0 0") or not. However this will error if the terrain is rotated such that hills overhang, like some of the annihilation map pack missions.

I was looking at deploy codes, that use function vector::dot to determine if the deploy surface is close to level or not.

I'm wondering if this would be a good method to determine which side of each terrain you belong on..

PS: I want this script to work during missions with multiple terrains.
Perrinoia
Suggestion bot 10,000
 
Posts: 11185

2 Thu Feb 12, 2015 12:58 pm

Never mind...

I'll just write a function that makes a list of all terrain rotations and call it from mission init, and then have my other function use vector::getFromRot to get a vector where each terrain shouldn't be from the player.
Perrinoia
Suggestion bot 10,000
 
Posts: 11185


Return to Coder's Hangout

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron