update transformComponent style, and change the position of button 'Add Component'

This commit is contained in:
2026-01-01 00:57:23 +08:00
parent faecfe21ab
commit abf0a65bd6
2 changed files with 156 additions and 184 deletions

View File

@ -53,7 +53,7 @@ namespace FPSExample
RaycastHit hitInfo;
if (Input.IsKeyPressed(KeyCode.H) &&
Physics.Raycast(m_CameraTransform.Position + (m_CameraTransform.Transform.Forward * 5.0f),
Physics.Raycast(m_CameraTransform.Position + (m_CameraTransform.Transform.Forward),
m_CameraTransform.Transform.Forward, 20.0f, out hitInfo))
{
FindEntityByID(hitInfo.EntityID).GetComponent<MeshComponent>().Mesh.GetMaterial(0).Set("u_AlbedoColor", new Vec3(1.0f ,0.0f, 0.0f));