cassius Posted March 3, 2012 Share Posted March 3, 2012 Can someone show me a code example of how to move an enemy character which has a controller. blitzmax preffered but I will take anything. Thanks. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Clackdor Posted March 3, 2012 Share Posted March 3, 2012 Can you be more specific? Below is the essential code I use for controlling my skeletons. Works pretty well except for the running into stuff and use of too many constants. PointEntity(enemy_pivot,player_pivot); turn = EntityRotation(enemy_pivot).Y; move = 3.5f; UpdateController(controller,turn,move,0,0,10); Quote Link to comment Share on other sites More sharing options...
cassius Posted March 3, 2012 Author Share Posted March 3, 2012 That looks fine. Thanks. I have had no problem using moveentity with enemy controllers but I heard that its not the proper way so I thought "why not ask." Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
paramecij Posted March 4, 2012 Share Posted March 4, 2012 Because MoveEntity breaks the physics, as it 'teleports' rather then physically moves the entity Quote Link to comment Share on other sites More sharing options...
cassius Posted March 4, 2012 Author Share Posted March 4, 2012 I haven't encountered many problems using moveentity with controllers . My enemy characters knock over oildrums and suchlike in a natural way.I just want to use the correct methods because they ARE the correct way. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Josh Posted March 4, 2012 Share Posted March 4, 2012 Controllers don't actually use the real physics simulation, though. The reason for this is because the character physics have no concept of rotation. If you introduce rotation, you have to have compensating forces that keep the character upright, and those always cause unwanted effects. This is why most character controllers built into physics libraries are usually really bad. The lead dev from Amnesia/Penumbra recommended I do it this way, and it was a good idea. So it's probably safe to move a controller with the entity positioning commands. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
cassius Posted March 4, 2012 Author Share Posted March 4, 2012 interesting. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.