Skip to content

Commit

Permalink
Drop Interactions and Item placement (#1446)
Browse files Browse the repository at this point in the history
* Cleaned up item placement, check for flat surface, keep rotation even

* Added viewpoints to entities.

- Added checks regarding dropping items to the angle of the surface they are placed on.
- Simplified dropping items to only use the Y axis, so you can place items flatly but also the rotation you want.

* Cleanup to only target world layer mask instead of character.

Added check that test raycast hit is near interaction point.

* cleanup

* Polish the code

---------

Co-authored-by: Mechar418 <iamteapot42@gmail.com>
  • Loading branch information
Necromunger and iamteapot422 authored Jun 26, 2024
1 parent 4ee9895 commit c2310ad
Show file tree
Hide file tree
Showing 9 changed files with 263 additions and 108 deletions.
34 changes: 34 additions & 0 deletions Assets/Content/WorldObjects/Entities/Humanoids/Ghost.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,37 @@ Transform:
m_Father: {fileID: 8948279595827497419}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2286802132471542845
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7266407612763213600}
m_Layer: 11
m_Name: ViewPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7266407612763213600
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2286802132471542845}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3286557327597274053}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2744201510418370859
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -262,6 +293,7 @@ Transform:
- {fileID: 22761190788478486}
- {fileID: 2594776435570904838}
- {fileID: 4985541985952727430}
- {fileID: 7266407612763213600}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -381,6 +413,7 @@ MonoBehaviour:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 3227132888119106738}
_networkObjectCache: {fileID: 3227132888119106738}
ViewPoint: {fileID: 2286802132471542845}
_mind: {fileID: 0}
--- !u!114 &-824690604824484445
MonoBehaviour:
Expand Down Expand Up @@ -438,6 +471,7 @@ MonoBehaviour:
_lerpMultiplier: 2
_rotationLerpMultiplier: 5
_movementTarget: {fileID: 4985541985952727430}
TargetMovement: {x: 0, y: 0, z: 0}
--- !u!1 &2858841725742773226
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit c2310ad

Please sign in to comment.