TorqueFan Posted December 12, 2019 Share Posted December 12, 2019 (edited) Hi all. I'm nearing an alpha stage on a game I've been working on but there is one looming bug that just continues to elude me. This particular bug has popped up from time to time for the past at least 10 years in Torque history, and it still(apparently) exists. I was hoping some of the hard hitters around here might be able to help with squashing this guy once and for all.The GoalAlright, so first what I'm trying to do. I want the mouse cursor visible on the screen and the AIPlayer to follow it. I have this currently working, check!The ProblemStock Torque3D 3.10.1 with default Soldier model and datablock:The bug arises randomly where moving the mouse will result in the AIPlayer's forward vector 'spinning' visually. If the mouse cursor is still, the AIPlayer runs along to it just as it should because there is no rotation being calculated for the AIPlayer. As soon as the mouse cursor deviates from it's straight ahead forward vector course, something causes the AIPlayer to visually 'twitch' or 'spin'. As soon as the rotation is complete and the AIPlayer is once again following a straight ahead path to the cursor, all is well.This is all intermittent, as in it occurs sometimes and sometimes it does not. I have noticed that when this happens there is a visual 'hitch'(similar to what you'd see when a new material appears for the first time in a scene) and immediately the rotation is whack. It will remain in this 'state' of visual ugliness until I hit the space bar to make the AIPlayer stop. Once the AIPlayer starts moving again by the space bar toggle, the rotation is working fine again until it decides once again it is time to fail.This occurs whether I am calling a schedule to move the AIPlayer or if I only call the movement command 'per click'.SourcesHere are some examples of how this problem has been around and continues to be around since(probably) Torque's conception:Bare in mind the old GG site is throwing up certificate errors for awhile now on some of their old forum posts.From 2005: Here the problem seems to have been caused by the 'Eye' node in the player art. http://www.garagegames.com/community/forums/viewthread/34046From 2010: Not sure if it's helpful but this is an early case of the problem. It does seem similar to what I'm seeing now.https://www.garagegames.com/community/forums/viewthread/122291From 2011: (In this case the bug 'disappeared' yet a fix was never found.)https://www.garagegames.com/community/forums/viewthread/124932From 2011:This one is particularly interesting since it's marked as resolved yet I have implemented the code here to try to fix it and it doesn't fix it today.http://www.garagegames.com/community/forums/viewthread/123597From 2011: This is a resource that was made by @GuyA . I did implement this to try it, and it still works to this day but sadly doesn't stop the 'jitter'.http://www.garagegames.com/community/resources/view/21188From 2013: This one is by @Nilshttp://www.garagegames.com/community/forums/viewthread/133374As you can see this has occurred as far back as 2005. Of course, we all have our own implementations and what have you but this can be replicated with current Torque3D 3.10.1 without altering any code. Just make an overhead cam, spawn an AIPlayer, set the camera to orbit that player, and hook in some standard raycast code to tell the AIPlayer where to go. The problem will show itself eventually. I can provide any and all scripts if necessary :geek: Edited December 27, 2019 by TorqueFan Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.