Quantcast [open] IsUnitFalling(unitTag) / IsUnitJumping(unitTag) - ESOUI
Thread Tools Display Modes
06/24/19, 02:26 AM   #1
Sordrak
 
Sordrak's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 38
[open] IsUnitFalling(unitTag) / IsUnitJumping(unitTag)

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.
  Reply With Quote
07/12/19, 01:00 AM   #2
Cardinal05
AddOn Author - Click to view addons
Join Date: Feb 2018
Posts: 32
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")
__________________
Geezus Take The Heal (@Cardinal05)
Adder of Ons : DecoTrack | Essential Housing Tools | Guild Alert | Lights of Meridia | Magic Carpet
  Reply With Quote
07/17/19, 01:50 AM   #3
Sordrak
 
Sordrak's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 38
Originally Posted by Cardinal05 View Post
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")
Thanks, I'll take a look at it. But i guess, without looking at your code, that you calculate the movement differences and at a certain threshold it will be considered as falling. If that's the case, then unfortunately, this wouldn't be enough
  Reply With Quote
10/21/19, 03:12 PM   #4
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 35
IsUnitInAir and IsUnitFalling will be in the API next release (not the release that just went out.) At the moment only the local player unit will ever return true.
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] IsUnitFalling(unitTag) / IsUnitJumping(unitTag)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off