by gramps » Mon Jun 03, 2019 10:51 pm
Just spitballing here, but you could try something like this:
- First, make sure the "arrow in wall" actor is actually in the moving sector. Make sure the tip of the arrow sprite is its world origin, and push it forward a little bit when it hits the wall.
- Next, check if it's below the floor or above the ceiling. If it's above the ceiling, it's in a door, and needs to move relative to ceiling. If it's below the floor, it's in a lift, and needs to move relative to floor. If it's between the floor and ceiling, it's probably
on a regular wall, so leave it there and stop here. *
- Store the distance between the arrow and the floor/ceiling, and whether it's in a door or lift. After you've stored it, update the position every tick so that it maintains the same distance to the floor/ceiling. Make it disappear after a while so you don't have too many of them stacking up.
Maybe there are better ways to peg it to a certain distance from floor/ceiling, not sure about that. I think the first step is the key to getting this to work.
* Maybe it's on a blocking midtexture line though, and that could be part of a moving platform. Not sure what to do about that.
Just spitballing here, but you could try something like this:
- First, make sure the "arrow in wall" actor is actually in the moving sector. Make sure the tip of the arrow sprite is its world origin, and push it forward a little bit when it hits the wall.
- Next, check if it's below the floor or above the ceiling. If it's above the ceiling, it's in a door, and needs to move relative to ceiling. If it's below the floor, it's in a lift, and needs to move relative to floor. If it's between the floor and ceiling, it's probably
on a regular wall, so leave it there and stop here. *
- Store the distance between the arrow and the floor/ceiling, and whether it's in a door or lift. After you've stored it, update the position every tick so that it maintains the same distance to the floor/ceiling. Make it disappear after a while so you don't have too many of them stacking up.
Maybe there are better ways to peg it to a certain distance from floor/ceiling, not sure about that. I think the first step is the key to getting this to work.
[size=85]* Maybe it's on a blocking midtexture line though, and that could be part of a moving platform. Not sure what to do about that.[/size]