AddAttachedPropToProp is broken? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: AddAttachedPropToProp is broken? (/thread-9358.html) |
AddAttachedPropToProp is broken? - Apjjm - 07-25-2011 The function as described in the wiki. Code: void AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ); Image 1: "Swapped" order Image 2: Order as described in wiki In the second image, you can see that whilst there is clearly no rotation, there is also no depth, the Z-position parameter was ignored. When looking at the first image there is depth, but also a rotation around zx - the rotation parameter counted as both! Below is the relevant function call I am making in my code: Code: //First image (Which shouldn't behave like this) Any workarounds or chance of a fix? UPDATE: Turns out it really is broken in that way, the following function fixes the problem, provided you do not want the attached prop to be rotated: Code: void FixedAttachPropToProp(string target, string attach, string entity, float x, float y, float z) { |