The online racing simulator
Path nodes in InSim Application
(3 posts, started )
Path nodes in InSim Application
Hello fellow programmers.

In the CompCar struct the first element is the ID of a path Node.
I was wondering if that ID corresponds to the Node block in the PTH files.

If not is there a way to get the information from the CompCar::Node property and convert it to a valid Node from the PTH file.
These might be helpful to you.

Explain - MCI Packet information discussion.
InSim Direction help. - Direction of motion for two vehicles with a vector of direction.
Quote from xolan1993 :In the CompCar struct the first element is the ID of a path Node.
I was wondering if that ID corresponds to the Node block in the PTH files.

If not is there a way to get the information from the CompCar::Node property and convert it to a valid Node from the PTH file.

Hi, yes Smile its an index of the path nodes array.

PTH file format is described in SMX viewer PTH.txt file (I'm attaching it here for convenience).

To get the exact node you just load nodes from PTH file into an array and automatically the index from CompCar should correspond to the correct node.

Keep in mind that path may not start from the start/finish line. Which node is the start is described in header block:
1 int 12 finish line : number

Attached files
PTH.txt - 1.5 KB - 120 views

Path nodes in InSim Application
(3 posts, started )
FGED GREDG RDFGDR GSFDG