cassius Posted June 10, 2016 Share Posted June 10, 2016 I am using point and follow with enemy characters but when they get close to the camera/player they lean forward and seem to go downwards. Can this be corrected in any 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...
macklebee Posted June 11, 2016 Share Posted June 11, 2016 Doesn't Entity:Follow() / Entity:GoToPoint() automatically point the character on its Y-axis the direction it needs to move? Why use Entity:Point() at all? Might even cause a jitter? Have not tried it but using the two commands seem like there would be a potential conflict. Edit-- or are you just using it to point the enemy at the character after it comes to rest after a Follow() as it seems to rotate the enemy away from the target? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cassius Posted June 11, 2016 Author Share Posted June 11, 2016 no. Follow works without point but then the enemy walks backward. It looks to me that the spot point points to is low down on the target character making enemie lean forward when very close. 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...
macklebee Posted June 11, 2016 Share Posted June 11, 2016 no. Follow works without point but then the enemy walks backward. When you place the enemy within the editor and select it, the character should be facing the same direction as the global positive Z-axis (blue arrow). If it is not (like the crawler model), then you must set the character angle in its properties panel or via code when you load the model. If you set character angle via the properties panel then you can also set the Physics Mode to 'Character Controller', the Collision Type to 'Character', and the mass. Once you do that, then save the model as a Prefab. Then either load the prefab by placing it in the Editor's scene or by code via Prefab:Load(). Another way around that entire problem is to just load the FBX model into a modeling app or UU3D and rotate the model 180 degrees and save so it will be facing the right direction. It looks to me that the spot point points to is low down on the target character making enemie lean forward when very close. Yes I suspect it does since the point on the entity it is looking at would be at its feet, where the character's origin is located. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cassius Posted June 12, 2016 Author Share Posted June 12, 2016 I do rotate characters in uu3d when possible, as long as it is not just mdl format. Setting the angle in code or editor did not work. 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...
f13rce Posted June 12, 2016 Share Posted June 12, 2016 The behavior is probably because the point they're looking to is below them. You probably only want the Y rotation of the model, so you can set the X and Z rotation to 0 using SetRotation. Quote Using Leadwerks Professional Edition (Beta), mainly using C++. Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz Previously known as Evayr. Link to comment Share on other sites More sharing options...
cassius Posted June 12, 2016 Author Share Posted June 12, 2016 ah. Thanks everyone. looks like if I set up character in editor then save it as prefab I can cu out a lot of coding. I didn't realize that characters could be prefabs.BIG mistake made over a long period of time. 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.