Basically, I have a character whose movements I want to be like the spheres in the “Rolling ball template” in UE 4.10+.
However, I want to use a custom model (not a ball) and my custom model should NOT rotate with the collision sphere, only follow it. Is that possible without some inefficient trick like forcing its rotation every tick/frame?.. that just seems so messy.
To explain what I want a bit better: I want the box to seem to slide with the same physics as the spheres do, but I don’t want it to tumble like a sphere, just slide on one side.
And I’d like to use as few ticks as I possibly can.
Quick and dirty method: dont make the box a child, grab the root components location anr set the box’s world rotation to default and location to the root every tick.
But using tick events is literally the only way of doing anything tied to a constant update of an objects transform.
Performance wise, its only 3-5 extra processes per tick, with no complex number crunching. So unless you spawn like 5000 of these suckers, most modern machines should handle it no problemo.
If you DO intend to spawn obscene numbers of these things (or hook up the tick event to a complex task), performance savings can be had by making the rotation update only every few ticks, and having internal logic to process a certain subset of the spawned actors staggered across those ticks to distribute the processing.