TCL problem

Post » Thu Dec 31, 2009 7:37 am

I'd like to be able to disable/enable collision while having player flying.
First TCL command just disables collision, but second TCL call to re-enable collision (after a few frames) immediately warps player to the floor .
I tried fixing player vertical position in the same frame immediately before and/or after TCL (example)
set savedZ to ( player->GetPos Z )player->SetPos Z savedZTCLplayer->SetPos Z savedZ
, but it does not work.
Anybody has a similar problem solved?
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Thu Dec 31, 2009 6:25 am

I think SetPos does make actors snap to ground every time it's called, except for when the actor has levitation on them. You could try temporarily giving the player an ability with a constant levitation spell effect.
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Thu Dec 31, 2009 9:13 pm

I think SetPos does make actors snap to ground every time it's called, except for when the actor has levitation on them. You could try temporarily giving the player an ability with a constant levitation spell effect.
Thanks, but player has already a levitation spell. Problem is the second TCL reenabling collision ignores also levitation effect for that frame, you can test the TCL TCL glitch also from the console when flying.
I think TCL may be hardcoded to reset player position before reapplying any other effect/function/positioning.
User avatar
Angel Torres
 
Posts: 3553
Joined: Thu Oct 25, 2007 7:08 am


Return to III - Morrowind