UCLASS()
class AHeroCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category = "Movement")
float JumpForce = 620.f;
};GetWorldTimerManager().SetTimer(SpawnTimer, this,
&AWaveManager::SpawnWave, 5.f, true);UFUNCTION(BlueprintCallable, Category = "Combat")
void ApplyDamage(AActor* Target, float Amount);
if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
{
GrabObject(rightHand);
HapticPulse(0.4f, 0.1f);
}$ git commit -m "fix: player no longer clips through walls"
public class PlayerController : MonoBehaviour
{
[SerializeField] float speed = 6f;
void Update()
{
var input = new Vector3(Input.GetAxis("Horizontal"), 0,
Input.GetAxis("Vertical"));
transform.Translate(input * speed * Time.deltaTime);
}
}if (Physics.Raycast(ray, out RaycastHit hit, 100f))
hit.collider.GetComponent<IDamageable>()?.TakeDamage(25);ARSession.stateChanged += state =>
Debug.Log($"AR state: {state}");float4 frag (v2f i) : SV_Target
{
float rim = pow(1 - saturate(dot(i.normal, i.viewDir)), 3);
return _BaseColor + rim * _RimColor;
}IEnumerator Respawn()
{
yield return new WaitForSeconds(3f);
player.transform.position = checkpoint.position;
}float4 frag (v2f i) : SV_Target
{
float rim = pow(1 - saturate(dot(i.normal, i.viewDir)), 3);
return _BaseColor + rim * _RimColor;
}Event Tick
▷ Set Actor Location
New Location ●
Sweep ☐
void AHeroCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
Stamina = FMath::Clamp(Stamina + Regen * DeltaTime, 0.f, 100.f);
}// TODO: remove this hack before shipping
#define FPS_TARGET 90 // a must for VR
On Component Hit
▷ Apply Damage
Damaged Actor ●
Base Damage: 25.0
GetWorldTimerManager().SetTimer(SpawnTimer, this,
&AWaveManager::SpawnWave, 5.f, true);UFUNCTION(BlueprintCallable, Category = "Combat")
void ApplyDamage(AActor* Target, float Amount);
Event BeginPlay
▷ Spawn Actor from Class
Class: BP_Enemy
Spawn Transform ●
$ git commit -m "fix: player no longer clips through walls"
public class PlayerController : MonoBehaviour
{
[SerializeField] float speed = 6f;
void Update()
{
var input = new Vector3(Input.GetAxis("Horizontal"), 0,
Input.GetAxis("Vertical"));
transform.Translate(input * speed * Time.deltaTime);
}
}Input Action Jump
▷ Launch Character
Launch Velocity ●
XY Override ☑
ARSession.stateChanged += state =>
Debug.Log($"AR state: {state}");float4 frag (v2f i) : SV_Target
{
float rim = pow(1 - saturate(dot(i.normal, i.viewDir)), 3);
return _BaseColor + rim * _RimColor;
}Event Tick
▷ Set Actor Location
New Location ●
Sweep ☐
$ git commit -m "fix: player no longer clips through walls"
public class PlayerController : MonoBehaviour
{
[SerializeField] float speed = 6f;
void Update()
{
var input = new Vector3(Input.GetAxis("Horizontal"), 0,
Input.GetAxis("Vertical"));
transform.Translate(input * speed * Time.deltaTime);
}
}if (Physics.Raycast(ray, out RaycastHit hit, 100f))
hit.collider.GetComponent<IDamageable>()?.TakeDamage(25);ARSession.stateChanged += state =>
Debug.Log($"AR state: {state}");float4 frag (v2f i) : SV_Target
{
float rim = pow(1 - saturate(dot(i.normal, i.viewDir)), 3);
return _BaseColor + rim * _RimColor;
}IEnumerator Respawn()
{
yield return new WaitForSeconds(3f);
player.transform.position = checkpoint.position;
}void AHeroCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
Stamina = FMath::Clamp(Stamina + Regen * DeltaTime, 0.f, 100.f);
}// TODO: remove this hack before shipping
#define FPS_TARGET 90 // a must for VR
UCLASS()
class AHeroCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category = "Movement")
float JumpForce = 620.f;
};GetWorldTimerManager().SetTimer(SpawnTimer, this,
&AWaveManager::SpawnWave, 5.f, true);UFUNCTION(BlueprintCallable, Category = "Combat")
void ApplyDamage(AActor* Target, float Amount);
if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
{
GrabObject(rightHand);
HapticPulse(0.4f, 0.1f);
}$ git commit -m "fix: player no longer clips through walls"
public class PlayerController : MonoBehaviour
{
[SerializeField] float speed = 6f;
void Update()
{
var input = new Vector3(Input.GetAxis("Horizontal"), 0,
Input.GetAxis("Vertical"));
transform.Translate(input * speed * Time.deltaTime);
}
}if (Physics.Raycast(ray, out RaycastHit hit, 100f))
hit.collider.GetComponent<IDamageable>()?.TakeDamage(25);ARSession.stateChanged += state =>
Debug.Log($"AR state: {state}");float4 frag (v2f i) : SV_Target
{
float rim = pow(1 - saturate(dot(i.normal, i.viewDir)), 3);
return _BaseColor + rim * _RimColor;
}IEnumerator Respawn()
{
yield return new WaitForSeconds(3f);
player.transform.position = checkpoint.position;
}