Beginner GamePlay Scripting
UNITY TUTORIAL | SCRIPTING | LookAt
LookAt with Camera to track another GameObject
transform.LookAt()
Transform.Translate | Transfrom.Rotate | Unity | Public
Transform.Translate | Transform.Rotate | Script | GetKey
Input.GetKey
Light .enabled Script
Light.enabled Unity
Light.enabled Unity | Light ON
Light.enabled Unity | Light OFF | Input.GetKeyUp
UNITY TUTORIAL | SCRIPTING | Update() and Fixed Update()
Update()
Update() is called per frame on every script that uses it
Update() is called before rendering a frame
Update() is used for anything that needs to be changed or adjusted regularly happens here
moving non-physics object
simple timer
receiving input
Update() interval times vary
If one frame takes longer to process than the next frame, then the time between update calls will be different
FixedUpdate()
FixedUpdate() is called on a regular timeline
Fixedupdate() is called before performing any physics calculation
FixedUpdate() will have the same time between calls
FixedUpdate() interval times are consistent
Immediately after FixedUpdate() is called, any necessary physics calculations are made
FixedUpdate() is used for regular updates
adjusting physics (RigidBody) Objects
FixedUpdate() | Update()
FixedUpdate() | Update() | Result
Posts navigation