How to make objects always face the camera in UE4?

To make the object always face the camera, a key node is needed: Find Look at Rotation

Among them, Start connects the object position vector that needs to be rotated, and Target connects the camera position vector

Finally set the SetActorRotation node.

The Event Tick event node is used here to ensure that the orientation of the object can be adjusted every frame.

So far, the effect of making the object directly face the camera is achieved. Next, we introduce an operation that adds the lens smoothing effect, adding a softening node RInterp To on the basis of the Find Look node.

Current is connected to the rotation property of the object, Target is connected to the rotation property of Find Look, and Delta Time is connected to the time of one frame, which can be directly derived from the event node of Event Tick, or obtained through Get World Delta Seconds

The Speed ​​value can be set arbitrarily, indicating the degree of softening.

Finally set the resulting rotation value to the object's rotation value.

You're done!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325707472&siteId=291194637