I am finally digging in this, with current goal - make kind of caterpillar tank robot platform, will be on shorter basis than "normal" tanks, less wheels. Watched 3 parts of video tutorials by Peter Pankras (big Thanks to him). There is that question - settings of treads are still that lot of manual work, nothing changed recently? In any case, big Thankyou to Author for this asset, plugin, examples.
EDIT: well i actually already have "something". It is not that bad, editing treads, kinda fun even This my early test thing is super unstable (even if center of mass moved -X a bit, but that's definitely my fault with this chosen "design"
Hi BoredEngineer, I wanted to say thank you very much for making this plugin, it really helped me solve some issues I was having with a prototype I made. I honestly wish there was something like this in the default unreal BP system and think it would be a great addition to the engine.
Like Porckchop I would love to see a 4.22 version if you have the time!
can someone please tell me how to get wheel hit results from ue4's wheeled vehicle wheels thru a c++ function library, like maybe a code snippet or something? I want to get surface material and at track and particle effects to it without additional traces.
porckchopCarvedPixel
Updated both plugin and content to 4.22. Haven't done substantial testing, on a first glance things work, there where just one small irrelevant change to get it running in 4.22
BoredEngineer Hi, am sure you are very busy so not sure you will have time to answer but I am running into an issue with velocity calculations (particularly velocity at point calculations)
I think this might be more of an unreal issue (or a issue in my math/Nodes) but thought I would ask to see if you had any pointers on what best to do. I have done lots of tests but here are a few that seem most relevant...
All tests use the "Event MMT Physics Tick" to run them.
First Test... I got the root location of the Physics Body and got velocity at that point (Printed that to screen) and compared it to the Physics Body component velocity (Also printing that to Screen). The result of this was two vectors that match Exactly every Physics SubStep! Yey
Second Test... I got the Location of the Physics Body for the current Physics SubStep and Subtracted that from the Previous Physics SubStep Location of Physics Body then divided that by the SubStep DeltaTime (from the Event MMT Physics Tick - Substep Delta Time) to get the Velocity, I then compared this with the Physics Body Component Velocity. (Again Printing both Vectors to screen and comparing)
The Results where not exact, values could be off by a small amount. Is this likely due to the SubStep Delta Time being slightly rounded?
Last Test... I got the location of a component (away from root this time) for the current Physics SubStep and Subtracted that from the Components Previous Physics SubStep Location, Divided the result by the SubStep Delta Time (from the Event MMT Physics Tick - Substep Delta Time) to get the velocity, I then compared this to the result of a "Get Physics Linear Velocity At Point" of that components location on the Physics Body. (Again Printing both Vectors to screen and comparing)
The results where different by quite a large amount (depending on how fast the component was moving)
Basically I was trying to understand why the results where different, is it due to the SubStep Delta time?
Does "Get Physics Linear Velocity At Point" work on Physics Substeps?
or is there something else I am missing.
Thanks in advance for taking the time to read this.
(Its quite possible I have messed something up in my nodes, as vector calcs are pretty new to me. :-S Sorry if that is the case!)
BoredEngineer Hi, am sure you are very busy so not sure you will have time to answer but I am running into an issue with velocity calculations (particularly velocity at point calculations)
I think this might be more of an unreal issue (or a issue in my math/Nodes) but thought I would ask to see if you had any pointers on what best to do. I have done lots of tests but here are a few that seem most relevant...
All tests use the "Event MMT Physics Tick" to run them.
First Test... I got the root location of the Physics Body and got velocity at that point (Printed that to screen) and compared it to the Physics Body component velocity (Also printing that to Screen). The result of this was two vectors that match Exactly every Physics SubStep! Yey
Second Test... I got the Location of the Physics Body for the current Physics SubStep and Subtracted that from the Previous Physics SubStep Location of Physics Body then divided that by the SubStep DeltaTime (from the Event MMT Physics Tick - Substep Delta Time) to get the Velocity, I then compared this with the Physics Body Component Velocity. (Again Printing both Vectors to screen and comparing)
The Results where not exact, values could be off by a small amount. Is this likely due to the SubStep Delta Time being slightly rounded?
Last Test... I got the location of a component (away from root this time) for the current Physics SubStep and Subtracted that from the Components Previous Physics SubStep Location, Divided the result by the SubStep Delta Time (from the Event MMT Physics Tick - Substep Delta Time) to get the velocity, I then compared this to the result of a "Get Physics Linear Velocity At Point" of that components location on the Physics Body. (Again Printing both Vectors to screen and comparing)
The results where different by quite a large amount (depending on how fast the component was moving)
Basically I was trying to understand why the results where different, is it due to the SubStep Delta time?
Does "Get Physics Linear Velocity At Point" work on Physics Substeps?
or is there something else I am missing.
Thanks in advance for taking the time to read this.
(Its quite possible I have messed something up in my nodes, as vector calcs are pretty new to me. :-S Sorry if that is the case!)
Get Physics Linear Velocity at Point is made specifically to take into account angular velocity of the object. So when you use the center of the object, you might get some rounding issues for sure. I don't remember if BP version of this function works the same way as c++ one and c++ one works correctly with sub-stepping (as far as I remember )
Thank you very much for the super fast reply! Honestly I am just a little confused at what might be the best way to get Upward velocity at a point/location on a physics body. I thought that the "Physics Linear Velocity at Point" but started to worry that it was not doing the substepping so that is why I created these tests but I feel I my have just confused my self more. haha
Do you know a good way of getting the velocity of a physics body at a point what takes into account sub-steping in BP? or is this something that you would normally do in C++?
Thank you very much for the super fast reply! Honestly I am just a little confused at what might be the best way to get Upward velocity at a point/location on a physics body. I thought that the "Physics Linear Velocity at Point" but started to worry that it was not doing the substepping so that is why I created these tests but I feel I my have just confused my self more. haha
Do you know a good way of getting the velocity of a physics body at a point what takes into account sub-steping in BP? or is this something that you would normally do in C++?
Thanks again for the reply
Here is BP if you want to calculate it yourself: https://answers.unrealengine.com/que...ild-in-bp.html
The formula is:
Linear Velocity + CrossProduct(Angular Velocity, Center of mass - Point of interest) = Linear velocity at point
all variables are vectors and Center of mass is not necessary the 0,0,0 of the object, it is calculated by the engine from the rough shape of the collision body. But you can query it with GetCenterOfMass, the vector is in world space.
I think provided BP function in the engine should work correctly with sub-stepping, you can test it manually with the math above, just don't forget to use center of mass instead of object location and point of interest some distance away in your calculations. If point of interest is to close to center of mass, like less than a centimeter, you can get numerical errors. TBH not sure how close you have to be to see that. Maybe location of center of mass gave you that difference in numbers before^
When using sub-stepping you just need to take care of the things that can change on each sub-step like transforms and velocities. Get velocity should work correctly as is, as far as I remember, it only check if body is driven by physics or not and if it is, then it reads velocity from body instance which is a wrapper around physics object. For transforms, MMT have functions which you already use MMTGetTransform it gets data from the body instance too.
In conclusion - I would expect "Physics Linear Velocity at Point" bp function to work correctly on sub-steps, unless something changed.
Anyone ever get this working in multiplayer, whatever i try to do it either doesn't move, moves on client but not server side, or just spazzes out, any help?
Comment