Warp actor under the grounds
Posted: Thu Dec 06, 2018 1:42 pm
I want to have image/texture of whats going on in front of a player from below the ground. For this I make special camera actor and force it follow the player.
But every time I try to warp it under the ground it stuck on the current sector floor level and refuse to warp deeper. I try to use set origin/xyz and a_warp with add to actor noclip, noblockmap and nointeraction flags with no effect.
Why does it happens and how to bypass this?
Example
But every time I try to warp it under the ground it stuck on the current sector floor level and refuse to warp deeper. I try to use set origin/xyz and a_warp with add to actor noclip, noblockmap and nointeraction flags with no effect.
Why does it happens and how to bypass this?
Example
Code: Select all
version "2.4"
class camera : actor
{
default
{
radius 1;
height 1;
+nointeraction;
+noclip;
+noblockmap;
}
}
class cameraman : inventory
{
//tracer is camera
override void doeffect()
{
if(self.tracer == null)
{
bool test;
[test, self.tracer] = a_spawnitemex("camera", 0,0,0);
}
tracer.setorigin( (owner.pos.x, owner.pos.y, owner.pos.z - owner.height), false );
console.printf("owner Z %d", owner.pos.z);
console.printf("camera Z %d", tracer.pos.z);
}
}