TYFKO Posted July 31, 2018 Posted July 31, 2018 Hi, First of all I´m completely new to both coding and this editor, be gentle I read through the tutorial documentation and played around a bit with the tutorial "worlds", now I wanted to create something on my own with this basic knowledge but I have already encountered my first problem. I created a cylinder that is supposed to be my character entity for now. My movement script and the camera for it work, but only if I set the cylinders physics mode to character controller. Now the problem is, whenever I put it to character controller, then the cylinder will just sink a little bit into the floor. Movement still works, but it seems as if part of the floor is not solid? Here´s a screenshot of what it looks like.. Probably it´s a stupid question but I´d still appreciate any help! Oh and is there any place where I can take a look at completed (well documented?) scripts to learn? Quote
Josh Posted July 31, 2018 Posted July 31, 2018 If you call camera:SetDebugPhysicsMode(true) it will show the physics shape and give a better view of what is happening. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
TYFKO Posted July 31, 2018 Author Posted July 31, 2018 Thank you, leaves me with this: That doesn´t look right 1 Quote
Solution macklebee Posted July 31, 2018 Solution Posted July 31, 2018 The problem with using a CSG cylinder instead of a model is that its origin is at the center and not at the base (or the feet like with a character model). If you look at the SetInput() example, notice that the 'visiblecapsule' cylinder is set as a child to the pivot (which is the actual player) and the cylinder's center is positioned up 1 meter from the ground. 2 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
ximitimix Posted September 12, 2019 Posted September 12, 2019 I have a similar problem as well, would really like to know where this cylinder collider comes from and how to change its shape or size Quote
gamecreator Posted September 12, 2019 Posted September 12, 2019 The cylinder shape is used when you use CharacterPhysics as the physics mode so you can use the automatic pathing for characters. You can check out the SetInput documentation for sample code (as macklebee also linked above). Unfortunately you can't change cylinder shape or size for character navigation but it should work fine for smaller or larger characters. Remember that the player won't be able to see the collision details and they won't notice small size differences. On the other hand, if your game has giants or mice that need to get in small spaces or something, Leadwerks pathing won't be for you. Quote
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.