Jump to content
Sign in to follow this  
Speedle

AttachTo and disappearing people

Recommended Posts

Hi,

I'm trying to make a medevac mission, so I need an injured soldier in the back of my helo. That's not a problem:

- place a UH-60 MED and call it

MD

- place a soldier and set it as "player"

- place another soldier

- place the three First Aid Modules and synch them with the last soldier

- in the init field of the last soldier type:

this setdamage 0.88; this attachto [MD, [0,2,-1.8], "velka vrtule "]; 

You should end with a wounded soldier lying on the floor of the helicopter. Fine.

Now try to get in, or switch to the pilot... the wounded soldier will suddenly disappear. And, last but not least, if you switch to 3rd person camera (while still on board) the wounded soldier will appear. Witchcraft?

I would really have a visible (and audible) soldier in the back of my chopper while i'm flying. Any thoughts?

Thank you, and sorry for my english ;-)

Share this post


Link to post
Share on other sites

The interior view is actually different than the exterior which is why you don't see them from the inside.

Share this post


Link to post
Share on other sites
The interior view is actually different than the exterior which is why you don't see them from the inside.

Hmm, nope the view is the same, you should see the same units in both views. There is a difference in the vehicle model when you're inside, panels & instruments for example, but the units are the same.

Share this post


Link to post
Share on other sites

Not sure which part "velka vrtule" is, but perhaps it is missing in some of the interior views, so the unit no longer appears attached from that viewpoint? I would suggest leaving out the "velka vrtule" mem point option to see if this rectifies it.

EDIT: Tested my suggestion - didn't fix it. The problem seems to be of a different nature: from inside the chopper, the attached soldier seems to move behind the chopper in the z-buffer - I could see small parts of him writhing over the edge of the chopper, but the rest was blocked, even though he still appeard to be close (inside).

This seems to be an issue with the renderer. I'm assuming that when you are inside a vehicle, the vehicle itself (including proxies, such as passengers) is always at the top/front of the z-buffer.

Edited by MadDogX

Share this post


Link to post
Share on other sites
Hmm, nope the view is the same, you should see the same units in both views. There is a difference in the vehicle model when you're inside, panels & instruments for example, but the units are the same.

The one time I tried to mess with vehicle models I know the interior LOD layer, the one you view when you're inside the vehicle, did not have the entire model included. So if you attached something to the outside LOD via attachTo in the same location as the interior LOD you wouldn't see it because you simply can't see it - it's not included in the LOD you can see while inside the vehicle.

Same thing as the C-130 and cargo scripts. From outside you see the attached vehicle, but when you're INSIDE, even with the ramp open you don't see the attached vehicle, because it's only attached to the external LOD.

Share this post


Link to post
Share on other sites

Nope, it's not a LOD issue. Just tested again with a C-130J and attached cargo containers:

zbufferproblem1.jpg

View from the outside.

zbufferproblem2.jpg

From the pilot seat.

The attached crates are still drawn, it's just that they are always moved behind the visible parts of the vehicle. Not a LOD issue. :)

Share this post


Link to post
Share on other sites

I'm still convinced it's an LOD thing. While you can see attached objects OUTSIDE the vehicle, you cannot see them INSIDE the vehicle:

41736918.jpg

If you move the cargo containers so they are on the side of the C-130 you can see them through the windows, but you cannot see the part that should be inside the vehicle. Which is where the laid out soldier is being attached.

I'm probably wrong, but that's how it's looking to me. I have a video at home that really shows this I'll try to post later.

Share this post


Link to post
Share on other sites

It's an engine limitation (though limitation may not be the appropriate word, design decision might fit better).

Essentially, in First Person, external world objects are always occluded by the viewer's model and its attached proxies regardless of where the actual polygons lay in world coordinates. So even if in world space the container is inside of the C130's cargo area, every part of the C130 model and any crew sitting inside will be drawn in front of the container.

To call it a bug may be difficult, because it has advantages too. For example, it keeps water from being rendered inside of the interior view of amphibious APCs, which would otherwise contain portions of the model submerged beneath the waterline. It also keeps other objects from seemingly clipping through the vehicle, sort of giving the effect of a sealed interrior. It's not without serious drawbacks of course, as you have demonstrated.

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites
It's an engine limitation (though limitation may not be the appropriate word, design decision might fit better).

Essentially, in First Person, external world objects are always occluded by the viewer's model and its attached proxies regardless of where the actual polygons lay in world coordinates. So even if in world space the container is inside of the C130's cargo area, every part of the C130 model and any crew sitting inside will be drawn in front of the container.

To call it a bug may be difficult, because it has advantages too. For example, it keeps water from being rendered inside of the interior view of amphibious APCs, which would otherwise contain portions of the model submerged beneath the waterline. It also keeps other objects from seemingly clipping through the vehicle, sort of giving the effect of a sealed interrior. It's not without serious drawbacks of course, as you have demonstrated.

Exactly all of the above.

Perhaps it would be possible for BIS to adjust this engine behaviour, so that any object attached to a vehicle is exempt from it (i.e. not rendered "behind" the vehicle). Not sure if this is even possible.

Share this post


Link to post
Share on other sites

Clearly the answer is to attach the transported soldiers directly TO the rotor blades rather than below them.

Share this post


Link to post
Share on other sites
Clearly the answer is to attach the transported soldiers directly TO the rotor blades rather than below them.

Or just choose a structure that is in both internal and external locations :)

Share this post


Link to post
Share on other sites

So, there's no way to do what I wanted... Mmm ok, fair enough.

Thanks everyone ;-)

Share this post


Link to post
Share on other sites

And what if I attach the wounded soldier to the pilot?

I'm busy now, but I'm gonna try it later...

No, it didn't work.

If in the pilot init field you put "moveindriver", the wounded soldier simply stays where you placed it in the editor.

If you put "assignasdriver" and "ordergetin" the wounded soldier "follows" the pilot until he enters the helo, and the wounded soldier stays in the last position.

Edited by Speedle

Share this post


Link to post
Share on other sites

Well a while back I tried attachTo using two guys to carry an ammo crate. I also had disappearing people, but for entirely different reasons. Try it. Hint - "Rocket science" :D

Share this post


Link to post
Share on other sites
Well a while back I tried attachTo using two guys to carry an ammo crate. I also had disappearing people, but for entirely different reasons. Try it. Hint - "Rocket science" :D

Just tried. --> :eek:

LOL

Share this post


Link to post
Share on other sites

Why doesn't it work if you just attach to the vehicle (i.e. not a specific memory point within the vehicle). I once attached a dog to a vehicle (so I could use it as a police dog) and it worked fine.

Share this post


Link to post
Share on other sites

That's how I normally attaches stuff. I rarely use memory point, too cryptic and often not all that obvious. Attaching crate to interior/exterior of UH-1H also was messy. Looked like physics wanting to play with attached objects not wanting to play.

Besides, dogs can only be attached to the mailman. That's a fact of life :p

Share this post


Link to post
Share on other sites
Why doesn't it work if you just attach to the vehicle (i.e. not a specific memory point within the vehicle). I once attached a dog to a vehicle (so I could use it as a police dog) and it worked fine.

We've tried without mempoint and it was the same. A nice effect this time: the soldier disappeared but his shadow was still there XD

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  

×