Difference between revisions of "Determining Ground Position"
Jump to navigation
Jump to search
m
no edit summary
imported>8asrun6aer m |
imported>8asrun6aer m |
||
Line 13: | Line 13: | ||
For levitate spells I do something very similar. If you set the z coord and then next frame get the new z coord, if it is the same (or higher) you have hit the ground. You can detect explosive wall collisons in a similar manner but this is harder. -- Guidobot | For levitate spells I do something very similar. If you set the z coord and then next frame get the new z coord, if it is the same (or higher) you have hit the ground. You can detect explosive wall collisons in a similar manner but this is harder. -- Guidobot | ||
: To see if an ''Actor'' has hit the ground yet, you can check its [[IsOnGround]] or [[IsInAir]] flags on each frame. [[IsSwimming]] is also a good one to check if the actor hit water. See those pages for any prerequisites. Generally, it looks like just an [[IsInAir]] check would suffice to check if | : To see if an ''Actor'' has hit the ground yet, you can check its [[IsOnGround]] or [[IsInAir]] flags on each frame. [[IsSwimming]] is also a good one to check if the actor hit water. See those pages for any prerequisites. Generally, it looks like just an [[IsInAir]] check would suffice to check if an actor is still floating or falling and hasn't encountered the ground yet. [[IsInAir]] works well with [[SetPos]] assuming your actor isn't moving too fast. --[[User:8asrun6aer|8asrun6aer]] 2012-12-21 | ||
How do you spawn items in game which fall to the ground with havok? (Off topic: how do you additem in the console: it always says that it can't find the object id i type) --Sykotik | How do you spawn items in game which fall to the ground with havok? (Off topic: how do you additem in the console: it always says that it can't find the object id i type) --Sykotik |