Question, was playing with the new JRR packet.
Right now I'm spawning a concrete slab below where I spawn them so that I am able to spawn them in the air(since ground checking is enforced), but I am currently trying to implement it so that a car can "hover" above another car(the slab is no big deal, as it prevents the car from falling on top of the other car which when that happens they intersect and go flying).
But my problem is. I can't seem to get the heading to match the heading of the car it's hovering above. Is there some weird math that is being done? from what LFS outputs with MCI, and what JRR takes in?
I tried the existing code we used in another PRISM plugin that takes the data and uses it to place a chalk arrow on the ground... and that still seems to be off...
here's the code from the plugin for layout objects, should the same code work? if so, something might be bugged either in PRISM's handling of the data or the way LFS handles it(or I'm misunderstanding how it should work).
Right now I'm spawning a concrete slab below where I spawn them so that I am able to spawn them in the air(since ground checking is enforced), but I am currently trying to implement it so that a car can "hover" above another car(the slab is no big deal, as it prevents the car from falling on top of the other car which when that happens they intersect and go flying).
But my problem is. I can't seem to get the heading to match the heading of the car it's hovering above. Is there some weird math that is being done? from what LFS outputs with MCI, and what JRR takes in?
I tried the existing code we used in another PRISM plugin that takes the data and uses it to place a chalk arrow on the ground... and that still seems to be off...
here's the code from the plugin for layout objects, should the same code work? if so, something might be bugged either in PRISM's handling of the data or the way LFS handles it(or I'm misunderstanding how it should work).
<?php
#Code from CompCar/MCI
$x = $Info->X/65536;
$y = $Info->Y/65536;
$obj = new LayoutObject($x, $y, ($Info->Z/65536) + 3, LayoutObject::$OBJ_REAL_OBJECT, 180 + $Info->Heading/32768 * 180, LayoutObject::$AXO_CONCRETE_SLAB, ($Info->PLID % 4));
$AXM = new IS_AXM();
$AXM->PMOAction(PMO_ADD_OBJECTS)->Info(array($obj))->send();
#JRR X,Y,Z code is slightly different($x & $y divided by 4096 instead of 65536)
#I'd include it but it's on my other computer...
#but no matter what I try for the heading, I can't get it to match up.
?>