I tried the method down below, and while the T Cell moves perfectly fine with it, upon reaching a wall it ignores it and continues moving.
I also tried printing the transform as it moved via the old function, and it seems like upon interacting with a staticmesh, the transform is set back to the prior coordinate, at which point it ceases moving. I am tempted to go down the non-physics route you suggested however, as I intend on creating this program without any physics modules in play.
Are you sweeping? How’s the wall collision? 2d is not my field so bear that in mind as I might be missing something crucial here.
If you’re using the method I posted in the answer below, could you please post a screenshot of the script? Not sure why this would not work.
On the hand, setting actor location (or transform) is just that. It does not really prevent geometry from intersecting. Just want to ensure we’re on the same page here.
I set it up exactly as you had it, I’m fairly certain.
Not that I know of. With both set to BlockAll, it should be true that they would understand that they both block each other’s sweeps.
That said, I realized something about the project: Raytracing is disabled deep in the settings. While I’m not quite sure that this is why I’m having issues, and turning it on crashes the program, it might be worth looking into. Is that raytracing enabler in any way related to the rays we’re using here?
If you mean the rendering option then no; I believe it might be referring to RTX or something even more esoteric.
Looks about right. Not sure. Sorry.
Is there anything special about the actor hierarchy perhaps? As in components, collision volumes or such?
This is definitely really weird then; if you have the exact same code with a different result, then there must be something strange happening with the cell itself. While I’m not too sure of how to proceed, what I could possibly do is attach the blueprint file itself to a comment here, which could hopefully be opened in an Unreal editor to see more details. As is, the file type is invalid, and I’m not sure if such a thing is possible through this site, but if there is a way please let me know!
I took some time to do some extra testing; it seems like in my case there’s definitely nothing wrong with the script itself. Rather there seems to be an issue with the sweep itself, as under no condition does it seem to register interaction with the wall as a “blocking hit.” What are the collision properties of the ball and wall in your example down below? I feel like by finding out the right combination of collisions, everything should start to work as intended.
It’s default. Not sure what the default are.
The assets used are in the engine. The ball is called SM_Ball_01
and the snazzy room mesh is called SM_Room_01
…yeah this makes absolutely no sense.
I created the same simulation you did in a separate project and it worked perfectly fine. I then ported the ball, script included, into my current project and it actually functioned completely as intended. Despite this, it still does not function when put on my T Cells, or even various other instances.
Maybe there’s something the ball has by default that the others don’t? I’ll do some more investigating.
Do tell once you get to the bottom of this!
I did it! I figured out what was wrong!
It turns out that the parent class of my T Cell was an “actor” rather than a “staticmeshactor.” While I’m not sure why this cause so many issues, I was able to change the parent class, and now the T Cell bounces as intended.
Thank you so much for your help!
Oh wow! Glad to hear that! You must feel relieved…
Good luck with your lymphocyte (right?) shenanigans!