DrVrej / VJ-Base

An addon for Garry's mod that contains bunch of bases to make many different types of addons.

Home Page:http://steamcommunity.com/sharedfiles/filedetails/?id=131759821

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bone follower suggestion and bug

darkjake opened this issue · comments

Aquatic based npc's using the bone followers can not move with bone followers attached.
Also a suggestion, please add a function for us to adjust the collision check hook on bone followers, for example allow the user to filter entities to it as the HasEntitiesToNoCollide function appears not to interact with the followers.
Also a 2nd bonefollower bug, it doesnt appear to respect hitgrouping at all. For example if a modifier of damage*0 is added to all hitgroups the entity will still take damage throughout. I am not sure if its at all possible to resolve that issue.

Apon further probing it appears to be larger more complicated collision models colliding with the main entity in aquatic situations, smaller models dont appear to be affected in water.

The movement issue can certainly be fixed, however bone followers rn we barely have enough control over because the bone follower functions were half-assed when ported to lua. Maybe once Rubat fixes that issue, we can do a lot more with them instead of jumping through hoops to get what we have now

commented

Good finds! Most, if not all of these issues can be fixed if rest of the bone follower functions were binded over to Lua, and bone follower support was added for NPCs (and other entities). I could try to fix some of these issues, but I know they will be very unreliable. Main issue is that the engine has no idea the NPC has a bone follower because the follower is called on a second entity that is then tied to the NPC itself, thus causing many collision issues including IK chains not working, velocity movements from non-walk frame NPCs messing up, NPC no collide not working, etc.

Check out this post for more information about what's missing in GMod: Facepunch/garrysmod-requests#1955

commented

All the issues are now fixed as of the latest commit 39011b4, notes about each on in order:

  • Made aerial and aquatic NPCs ignore bone followers, which fixes the issue where they can't move if they have a bone follower applied.
  • HasEntitiesToNoCollide now works by iterating through the other entity's bone followers (If it has any) and disabling collision with the NPC.
  • Hitgroups now work thanks to the request being fulfilled here: Facepunch/garrysmod-requests#1955