YouGroove Posted February 14, 2015 Share Posted February 14, 2015 Hi, After thousand of tests and a long discussion, we have a new bug : http://www.leadwerks.com/werkspace/topic/11975-pick-how-to-use-it/ We have a mob moving to the player using gotoPoint(). This mob calls Pick() every frame with parameters it's position and player position, to detect the player using raycast. Pick() don't work if the mob that is moving is not facing the player , or if the player turns around. how to test : -copy the map on your "Maps" directory -copy the scripts in "Scripts/Objects" - run the game You will have the blue ball on your player character each time the mob detects you using Pick(). Turn and move around the mob to see the blue ball no more on the player as Pick() don't work if the mob is not facing the player and if it is moving (GotoPoint() call). debug.zip Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted February 15, 2015 Author Share Posted February 15, 2015 Also Pick() don't work if you make these changes in DogAi script : posPlayer.y = posPlayer.y + 2 posMob.y = posMob.y +2.1 And if you replace the call to the function GotoPoint() by a call to Follow(). Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted February 23, 2015 Author Share Posted February 23, 2015 Serious problem if you use raycast (pick) on ennemies using Goto or Follow. Depending on Y values, raycast will work or not, sometimes it just don't work. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
beo6 Posted February 23, 2015 Share Posted February 23, 2015 I think this issue has nothing really to do with Y Values. It just does not correctly work for Character Controllers. That has probably something to do that the Character Controller is not a real newton physics object (at least that is what Josh explained a long time ago if i remember correctly) And only parent objects that are not a character controller get picked by a raycast. In my RTS project i had to parent the model anyway to correctly roate it so i didn´t really noticed that issue. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 23, 2015 Share Posted February 23, 2015 Use a hitbox for character controllers. I had issues with picking character controllers as well for Project Saturn. Using a simple hitbox solved this for me. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted February 23, 2015 Author Share Posted February 23, 2015 Using a simple hitbox solved this for me. Where did you attached the hit box ? to a bone ? Can raycast detect the box if it is a child of a bone ? ------------------------- Anyway why using character controller collision if it can't be used for any collision detection ? Or put the option to create hit boxes for characters and rayscat in the model editor. This is still a bug. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.