Big Scaled Cylinder causes lag when rotating

Hi all

I have built a laser beam, which consist of a cylinder. With blueprints, I made it to look always at the player (with Find look at rotation and Set World Rotation) and change X coord scale matching the distance between the laser origin and the player witth Set World Scale 3D on Tick event.

This works very well when the laser is placed at a normal distance from the player, but I wanted to put it at the top of a mountain (very far from the player) and so, when the laser scales in X an amount of 260 the game lags (at least in unreal editor, I have not done the build yet, so I don’t know if this will work well when builted).

Despite this, when the laser stops rotating and scaling (because the player enters a collider which allows the laser to rotate and scale and when it exits it, the laser stops rotating and scaling), the lag vanishes and reappears when entering the said collider and vanishes again when exiting it.

What should I do with that? Should I renounce to put the laser too far and put it nearer? I thought it would be a light problem, but no, when the laser is material-less the lag persists and importing a new cylinder with less faces made in blender also doesn’t make the difference.

1 Like

Turn off collision on the cylinder :slight_smile:

1 Like

that was it, man! it worked. I thought it would be enough to set the collision to Query Only,to allow by overlap when the player is touching it to damage him), but no. I set it to NoCollision and used Linetrace to detect the player.

Thank you very much :slight_smile:

1 Like

:star_struck:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.