View Single Post
07/12/19, 01:00 AM   #2
Cardinal05
AddOn Author - Click to view addons
Join Date: Feb 2018
Posts: 33
Originally Posted by Sordrak View Post
Hi guys

There's already a function IsUnitSwimming(unitTag).

I guess the two functions IsUnitFalling(unitTag) / IsUnitJumping(unitTag) wouldn't be hard to implement and could give quite a bit of nice insights on what is currently going on (analyzing a few things).

Furthermore, i believe there might be a few nice things possible with these two functions.
Just saw this now, but if you're still interested, I had encapsulated the logic for fall detection in my Magic Carpet add-on into the Featherfall.lua file.

The main thing that you would just need to change in order for it to work in non-Player Housing zones would be line 55:

local x, y, z = GetPlayerWorldPositionInHouse()

would need to be:

local _, x, y, z = GetUnitWorldPosition("player")
  Reply With Quote