Jump to content

Can anyone write a plugin that would allow animated walking machines to actually move?


Recommended Posts

Recently made a model that had an animated walking sequence but even though the foot that was pushing backwards was the only collider in contact with the ground, the body stayed still while the foot slid along the ground as if it had no friction.

Can anyone write a plugin where the collider in contact with the ground stays put and the rest of the model moves?

Link to comment
Share on other sites

2 hours ago, ColdJ said:

Recently made a model that had an animated walking sequence but even though the foot that was pushing backwards was the only collider in contact with the ground, the body stayed still while the foot slid along the ground as if it had no friction.

Can anyone write a plugin where the collider in contact with the ground stays put and the rest of the model moves?

Would that be a function of the friction defined between the ground and the "foot"?

Link to comment
Share on other sites

Three options, from the hardest to easiest :

- Code your own module that add a PhysicMaterial to specific Colliders on the part.
- Design separate parts having a single collider for the "feets", and use a stock ModulePhysicMaterial module on them.
- Design your part around the stock "grip pads" parts from the Breaking Grounds DLC.

Link to comment
Share on other sites

8 hours ago, darthgently said:

Would that be a function of the friction defined between the ground and the "foot"?

I would think so, It appears that the root of the model is held in place unless something external or a particular module like EngineFX acts upon it.

7 hours ago, Gotmachine said:

Three options, from the hardest to easiest :

- Code your own module that add a PhysicMaterial to specific Colliders on the part.
- Design separate parts having a single collider for the "feets", and use a stock ModulePhysicMaterial module on them.
- Design your part around the stock "grip pads" parts from the Breaking Grounds DLC.

I can't code which is why I am seeing if someone who can is able to do this.

Already tried a version where I created separate feet, Didn't matter which part was put down first when building the droid, the body would stay put and the feet would do a running man on the spot. Even tried a version where the feet rotated instead walked, with long colliders. In real life if you slowly tip a domino shape up on it's end and tip it forward then it gains ground each time the rear end lifts and it is tipped, but in KSP it just makes the model go up and down on the spot.

I already tried the Grip pad road, gave the feet/legs the grip pad module functionality. Made no difference. It is also no use trying to attach grip pads as the game only keeps them at the original co-ordinates that they were attached, so they don't move with the animation.

I know that I could use Breaking ground functionality to creates 3 part legs using 2 hinge joints and a piston, that require a Kal controller, but it seems overly complex just to get a droid to walk.

And so here I am asking if there is a smart coder who could make it work?

Link to comment
Share on other sites

@sebi.zzr I actually spoke to @linuxgurugamer before creating the thread, Ksp wheel was suggested but I have no idea how to make it work. I got the looping animation worked out but the physics won't give it friction, that is why am asking for a programming person who is capable of creating a plugin that could be used by any walking animation.

Link to comment
Share on other sites

2 hours ago, CFYL said:

This video, from 00:32 to 00:46. Does it seem to be what you want?

Sorry, but my system is unable to bring up that page. I have a very strict and limited browser set up and a fixed amount of data to work with each month.

Can you describe it?

Link to comment
Share on other sites

OOutNq.png

Can you see the picture tho?

This video is about a Venus lander, but this part is about a machine which walks on 4 legs. It's very wobbly, but it can walk. Each leg appears to be made up with two EAS-4 Strut Connectors, but I'm not sure.

This is his described mod pack.

Spoiler
Quote

ModuleManager

Kopernicus

RealSolarSystem

RSS textures

EVE

Scatterer

RSSVE

Mechjeb2

KOS

Karmax Autopilot

KerbalWindtunnel

Smokescreen

RealPlume

RealPlumeStock

Hyperedit

He has both DLCs installed.

I have, personally, came to a conclusion that he did this with breaking ground. In that case I am unsure if it is legitimate to get to the source code of BG.

5 hours ago, CFYL said:

I‘ve already sent a message to the video's author. If this seems to be what you want, I'll reply to you here.

Now the vlogger hasn't replied yet.

Link to comment
Share on other sites

1 hour ago, CFYL said:

Can you see the picture tho?

I can see the pic, thanks.

I can make things walk using the breaking ground pieces without a problem, from a slightly wobbly 2 legs up to a spider like 8 legs, using pistons and standard hinges and a KAL controller to keep running through the progression, atleast in a straight line, then add wheels to the feet so it is possible to pause and change direction before setting off again. I could even make parts in 3D modeling that use the modules and look more realistic for the application. But it makes for a complicated experience. What I had done was create a walking sequence through animation with a collider for each foot and found 2 stock ways to have a looping animation. But the way the physics engine works, the model would stay in place while the the feet move as if there is no friction. The model may as well have been on it's back and kicking it's feet in the air. Now obviously based on wheels and Breaking ground robotics, there must be a way to determine what can push a model along the ground. I just need someone who knows their way around to make a plugin so that it can happen in game.

Link to comment
Share on other sites

4 hours ago, CFYL said:

Now the vlogger hasn't replied yet.

I logged on again and found that he HAD replied at that time, somehow the system did not notify me of the message. He is also known here as @moar ssto. As he said,

Quote

"Walking" can't be achieved with a sing part like this.

It is (possibly) hardcoded into Unity.

KSP identifies your part's action as an animation, instead of actually moving.

These two are completly diferent.

Also, I haven't realized until now that you are asking someone to write a plugin so that you can simply add a MODEL{}to your part. Yes. I have misunderstood your question. My fault. MY FAULT.

Link to comment
Share on other sites

  • 2 weeks later...
17 hours ago, sebi.zzr said:

sorry man, you could reverse engineer the "critter crawler" or share some assets with us to see what are you trying to achive.

i would not expect any magic to happen.

Thanks for the thought. I very much appreciate anybody who actually tries to help when someone asks on the forums.

I will have a look at the critter crawler, I have learnt much through reverse engineering, though I fear this might be above my skill level.

I gave up on trying to make it walk and gave it a non canon mono wheel instead. Maybe in the future I might get something to work.

Thank you again.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...