Teleport Gun And Being Behind Geometry

Post » Mon Aug 30, 2010 3:01 am

I made this gun that teleports the player to the landing spot of the projectile. But I have two issues with it.

1) It sometimes places the player inside of geometry (like walls).
2) Sometimes after using it, the ground mesh vanishes. I don't think this is related to problem 1 as I have tried to set the location of the teleport higher in the Z direction than the returned location of the projectile, but it does not stop the ground from vanishing on occasion. It may be related to teleporting from one cell to a different cell.

The movement is done with SetPos

Does anyone know of a way to ensure the placement of the player will not be out-of-bounds?

Just curious is all. Its a little toy I was hoping to get working a little better than it is.
User avatar
GEo LIme
 
Posts: 3304
Joined: Wed Oct 03, 2007 7:18 pm

Post » Mon Aug 30, 2010 8:24 am

The problem is probably that the projectile is landing in an area that isn't loaded into memory. When you use setpos on the player to an area that isn't loaded it doesn't seem to load the ground mesh, and you can see the lod mesh all around the player. MoveTo would probably fix that, as it forces a proper cell load. Getting stuck in a mesh is going to be harder to avoid because when the projectile crosses into an unloaded area none of the actual statics are there, and not sure how the game determines the landing point of the projectile once it crosses into an unloaded cell.
User avatar
i grind hard
 
Posts: 3463
Joined: Sat Aug 18, 2007 2:58 am

Post » Mon Aug 30, 2010 3:34 am

I figured the ground issue was something like that. The problem with MoveTo is it requires a Ref ID and the token that performs the teleport is spawned without a ref ID. I'll have to think of a way to use moveto.
User avatar
Auguste Bartholdi
 
Posts: 3521
Joined: Tue Jun 13, 2006 11:20 am


Return to Fallout 3