I’m new to Armory but not Blender, and I’m really enjoying using nodes to develop a game in 3D. While I’ve been able to figure out solutions for a lot of my problems over my first couple of weeks working with it on and off there’s one issue that’s stumping me. So far I have been attempting to develop full 3D games using physics based movement wherever possible, but I’ve noticed that when object hit edges of platforms there’s frequently an awkward bump. Take for instance the following situation, illustrated below:
There’s a red platform and a blue platform. They are both currently passive rigid bodies with box collisions. Their origins have both been set to their geometry in order to ensure that the collision boxes match the dimensions of the objects themselves. I have a character that is currently using impulses to move forward, and try as I may the character almost always bumps upwards just a little bit when they move from one platform to the next. I’ve briefly attempted to get around this by setting the character’s linear factor to zero on the Z axis while on the ground, but so far no luck there. It’s possible I’m overlooking situations in my node setups that might
I’ve observed similar behaviors when moving this and other characters on ground that is using the convex hull collision shape option, as well as mesh. In those cases I suspect it’s due to interacting with the edges that make up the objects in question, but I’m certainly no expert here.
Any ideas for paths forward to smooth out this movement between different objects would be much appreciated. I would prefer to continue using physics based movement if possible, but if translations are the only way around this I’m prepared to overhaul things this early in development.
1 Like
I’m back to working in Armory after a break. I’m working on a slightly different project now, but I still was running into bumpy issues. In addition I was hoping to include terrain that would be difficult to handle using cube rigid bodies, as well as allow for lateral movement to be the same speed regardless of the current grade of the ground under a character’s feet. I have found a solution that will work for this project, and I’m posting it in this thread in case it will help out anyone else.
Below is an illustration of the concept. Bare in mind that this is a render that is not currently running any of the scripts and is only meant for illustrative purposes.
Blue Object: Rigid Body of any type
Red Object: Character object
Yellow Object: Character object “projector”
The “projector” is a rigid body that has its linear factor set to zero on the Z axis. Whenever it is moving a ray casts downwards towards the ground. The point where the ray come into contact with a rigid body with the correct mask is where we set the character object. This setup allows for characters to avoid the awkward bumping issue I was running into before, as well as move at the same speed regardless of whether or not they’re going uphill or downhill.
I set the “projector” to be a rigid body so that I could set up rigid body walls that can stop it, and therefore stop the player from walking through the visible walls. The “projector” and the walls used to stop it can be left unseen so the player only sees the visible objects. In theory we can turn off the “projector’s” ability to set the player’s location when performing tasks such as jumping, falling, being launched into the air by an attack, and so on.
Handling multi-story story buildings, archways, bridges, platforms and the like could be handled in numerous ways. The first one I thought of is having trigger rigid bodies that either the “projector” or player character object comes into contact with that changes where the projector is on the Z axis, thus changing what objects are hit by the ray casting first. I’ve yet to implement this but it seems sound in theory.
I hope this of use to someone! I have no doubt it’s an inelegant and unoptimized solution to one if not all of problems I put forth in this post, but it is a solution none the less. It seems less than ideal for a physics heavy action game such as a platformer, but for my current purposes it seems as if it will do the job.
1 Like