Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Interactions and Item placement #1446

Merged
merged 6 commits into from
Jun 26, 2024

Conversation

Necromunger
Copy link
Contributor

Summary

  • Added raycast checks to item drop interactions, so items cannot be placed;
  1. Outside of the ViewPoint of an Entity.
  2. On surfaces with a normal angle > 10.

The reason for the surface normal angle check is previously you could place any item against a wall or in any small place you could click, and the item would react with physics bouncing off the object it was spawned into.

  • Set rotation of placed item to be facing direction of entity.
    Items now seem to place neatly on the floor or on tables, previously items would LookAt the hand of player entity and also have the rotation of the hand when placed.

  • Added ViewPoint to Entity, to use as position reference to check if an Entity has line of sight with a position.

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.

Testing

Can be tested by attempting to place item

Networking checklist

  • Works from host in host mode.

Changes

  • Modified existing Entity prefabs (Human, Ghost, EngineeringBorg) to have a child ViewPoint Gameobject.

Necromunger and others added 6 commits June 22, 2024 02:21
- 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.
Added check that test raycast hit is near interaction point.
Copy link
Contributor

@iamteapot422 iamteapot422 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@iamteapot422 iamteapot422 merged commit c2310ad into RE-SS3D:develop Jun 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants