Difference between revisions of "Talk:SetPos"

Jump to navigation Jump to search
1,119 bytes added ,  10:53, 23 December 2011
no edit summary
imported>8asrun6aer
m
imported>DragoonWraith
Line 68: Line 68:


:There isn't really a good way. You could maybe try firing an invisible projectile in the desired direction, find it using [[GetFirstRef]], and then following it until it hits a wall? I've thought about doing things like that in theory quite a few times, but I've avoided actually having to try it to see if it would work.
:There isn't really a good way. You could maybe try firing an invisible projectile in the desired direction, find it using [[GetFirstRef]], and then following it until it hits a wall? I've thought about doing things like that in theory quite a few times, but I've avoided actually having to try it to see if it would work.
:10:53, 23 December 2011 (EST) 11:06, 22 December 2011 (EST)
:: For Player flying at least, I tested jumping (or triggering a jump), and while in the air, holding and adjusting only the Z position.  Though somewhat glitchy, with flight speed dependent on how fast you were running when jumping, it works for flying as collisions with walls still register while allowing you to move forward/back/strafe in-air.  Combined with hints from [[Determining_Ground_Position]], it effectively prevents moving through the ground and through walls... just not the ceiling.  Still, hopefully there's a better, more simple way. --[[User:8asrun6aer|8asrun6aer]] 2011-12-22
:: For Player flying at least, I tested jumping (or triggering a jump), and while in the air, holding and adjusting only the Z position.  Though somewhat glitchy, with flight speed dependent on how fast you were running when jumping, it works for flying as collisions with walls still register while allowing you to move forward/back/strafe in-air.  Combined with hints from [[Determining_Ground_Position]], it effectively prevents moving through the ground and through walls... just not the ceiling.  Still, hopefully there's a better, more simple way. --[[User:8asrun6aer|8asrun6aer]] 2011-12-22
:::If the player were put on some invisible platform, and the ''platform'' were moved under them (such that the difference in height from frame to frame was rather small), they might stay on it without calling SetPos on the player at all, thereby maintaining collision. Maybe. Be a tricky script to set up. I'd probably store the player's XY position in two float variables, setting the new Z by looking at the XY distance traveled, doing some trig using [[GetAngle]], and then using Disable, MoveTo, Enable on the platform to maintain collision. Probably with some maximum angle above and below the horizontal so that the player doesn't clip through the platform.
:::In-game, this will look a lot like the player is running through the air — which is exactly what Levitate used to look like.
:::[[User:DragoonWraith|<span style="font-family: Oblivion; size=2;">D</span>ragoon <span style="font-family: Oblivion; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion; size=2;">TALK</span>]] 10:53, 23 December 2011 (EST)

Navigation menu