Jump to content
Sign in to follow this  
padarom

Horizontally rotation

Recommended Posts

Hello,

I want to create a short UAV testing mission. Instead of directly giving the UAV controller to the player, I wanted to put it down on a table and let the player pick it up.

To achieve that, I created a Game Logic object and gave it the following initialization-code:

weaponUAV1 = createVehicle ["groundWeaponHolder", getPos this, [], 0, "can_collide"]; 
weaponUAV1 addItemCargo ["B_UAVTERMINAL", 1];

However now it looks like this:

20130831_00001.jpg

Am I somehow able, to horizontally rotate the object by 90 degrees, so that the terminal actually lies on the table?

Thanks in advance

Padarom

Edited by Padarom

Share this post


Link to post
Share on other sites

Thank you once again :)

Now that it's rotated, it either floats in the air above the table, or below (1m or 2m elevation). However I found myself not possible to use decimals in the elevation-box of the object.

Is there also a way to change the elevation of objects just ~0.3m, or even let it be falling on the table by the physics when placing it above?

Share this post


Link to post
Share on other sites

Yeah, that's what I noticed in testing. It's either right under the table or stupidly higher. You might try spawning both the weaponHolder and the table and make them both "CAN_COLLIDE" perhaps?

Or BIS can add in PhysX for little things so we could just drop crap on tables and avoid all of this. :)

Share this post


Link to post
Share on other sites

I tried using "this enableCollisionWith weaponUAV1;" for the table. It unfortunately didn't work.

Maybe I'll find an object to use as a table instead, which is a bit smaller than 1m. Thank you for your help.

edit Now I see what you meant. Is there a list of all object class names, like the table?

Edited by Padarom

Share this post


Link to post
Share on other sites

Click the Gear icon up to of the editor to get to the Config Viewer then double click cfgVehicles down at the bottom left.

Share this post


Link to post
Share on other sites

Okay, I found it. It's "Land_CampingTable_F".

However it doesn't seem to work, even with CAN_COLLIDE set. I might really need to search for a 1m high object.

edit:

I tried another approach:

weaponUAV1 = createVehicle ["groundWeaponHolder", getPos this, [], 0, "can_collide"];
weaponUAV1 addItemCargo ["B_UAVTERMINAL", 1];
weaponUAV1 setpos [getPos this select 0, getPos this select 1, 0.16]; 
[weaponUAV1, 90, 0] call BIS_fnc_setPitchBank;

This works quite well, as seen in this picture:

20130831_00003.jpg

However I've not yet been able to rotate it around it's Z-axis with this approach yet.

Edited by Padarom

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×