Some questions about the Actor datatype

mistahmikey

Active Member
1) When I do a LSType for actor, there is a method name WT for which I was unable to find any documentation. What does it do?

2) There are two members, CollisionRadius and CollisionScale, for which no documentation is available. I assume these somehow indicate how large an actor is, but it is unclear how they are intended to be used. Can you provide a bit more detail about how to use these properly?

3) There is a member, CheckCollision. I assume if I am standing on top of an actor (or within its CollisionRadius), CheckCollision will return TRUE?

Thanks.
 

Amadeus

The Maestro
Staff member
1) When I do a LSType for actor, there is a method name WT for which I was unable to find any documentation. What does it do?

2) There are two members, CollisionRadius and CollisionScale, for which no documentation is available. I assume these somehow indicate how large an actor is, but it is unclear how they are intended to be used. Can you provide a bit more detail about how to use these properly?

3) There is a member, CheckCollision. I assume if I am standing on top of an actor (or within its CollisionRadius), CheckCollision will return TRUE?

Thanks.

1. That's a method I used for testing and forgot to remove. It won't do anything if you try it anyway, but I just added code that should remove it from the list to avoid confusion (will go live next forced patch.)

All of the collision related documentation that I provided was in the patch notes from May 6, 2008:
Code:
* Added new MEMBERS to the 'character' datatype:
  1. CheckCollision[To_X,To_Y,To_Z]                        (bool type)
* Added new MEMBER to the 'eq2' datatype:
  1. CheckCollision[From_X,From_Y,From_Z,To_X,To_Y,To_Z]   (bool type)
* Added new MEMBER to the 'actor' datatype:
  1. CheckCollision                                        (bool type)  [Check between 'you' and the actor]
     CheckCollision[To_X,To_Y,To_Z]                        (bool type)  [Check between the actor and the given point]
***
*** Note:  As far as I can determine, there is no difference in EQ2 between "line of sight" checks and "collision" checks -- which,
***        of course, makes sense.  Also, please note that this checks a direct line from PointA to PointB for a collision.  So, if
***        you are, for example, in the Qeynos tradeskill instance and there are those balconies that have only railings it may not
***        return an accurate value because the "line" may go between the rails.
***
The only other documentation might be here on the forums. Honestly, I just added things I found and assumed that users would experiment with them and figure out the best way to use them.
 

mistahmikey

Active Member
The only other documentation might be here on the forums. Honestly, I just added things I found and assumed that users would experiment with them and figure out the best way to use them.
Yep, I know all the places to look, and I typically do wind up figuring things out by trial and error. Just hoping to short circuit that exercise if someone out there is able and willing to answer my questions :)
 

macker0407

Active Member
This include on SVN includes some examples of how the Collision* members are used, but it's at best a fudge. There are quite a few models(usually anything that'd classify as "giant scale") that won't work correctly with that calculation, so these days I tend to just use it as a fallback and the primary datasource is a custom set of multipliers I've generated over time using the .Distance member and the EQ2 target distance dynamic data.
 

mistahmikey

Active Member
Thanks for the info. I was guessing that the actual "hit sphere" radius of the Actor was CollisionRadius*CollisionScale, and it seems to bear out a the few mobs I've investigated. However, do you have any idea why they define it this way? In particular, why is it not just a straight radius? What purpose does CollisionScale serve?
 

macker0407

Active Member
Simplest explanation is likely CollisionRadius is the hitbox for that model type, CollisionScale is the model scaling. Keeping the values separate allows them to reuse models at arbitrary scales without having to create custom hitboxes per model instance.
 
Top Bottom