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

Interaction - Add interaction with terrain objects #8103

Merged
merged 13 commits into from
Oct 12, 2021

Conversation

Dystopian
Copy link
Contributor

When merged this pull request will:

  • title;
  • add dev function for replacing any terrain object with hotkey.

Terrain objects with ace_interaction_replaceTerrainObject config value == 1 are replaced with created object when interaction menu is being opened near them. This feature can be useful at least for dragging, acex sitting and acex field_rations.

@jonpas
Copy link
Member

jonpas commented Apr 20, 2021

What happens when terrain object is a large building and somebody is inside it?

Even on small objects, any chance for offsets, blowing things up inadvertendly etc.?

@jonpas jonpas added this to the 3.14.0 milestone Apr 20, 2021
@Dystopian
Copy link
Contributor Author

What happens when terrain object is a large building and somebody is inside it?

The largest "building" I tested and implemented is Land_BusStop_02_shelter_F (the bus stop on Chernarus 2020 and, I suppose, on Livonia), see acemod/ACEX#255. It works OK and nobody even see object replacing (including those who's inside it). Anyway I don't think replacing of large buildings is a good idea.

Even on small objects, any chance for offsets, blowing things up inadvertendly etc.?

There is a small chance of objects colliding. At least I saw plastic chairs falling to ground when replaced. But I don't think it's a big issue. And also the setting is disabled by default.

@jonpas jonpas requested a review from PabstMirror April 29, 2021 22:26
Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

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

I think that's pretty neat then!

addons/interaction/XEH_preInit.sqf Outdated Show resolved Hide resolved
addons/interaction/initSettings.sqf Show resolved Hide resolved
Dystopian and others added 2 commits May 1, 2021 13:19
Co-authored-by: jonpas <jonpas33@gmail.com>
addons/interaction/XEH_preStart.sqf Outdated Show resolved Hide resolved
addons/interaction/XEH_preStart.sqf Show resolved Hide resolved
Dystopian and others added 2 commits May 2, 2021 00:12
Co-authored-by: jonpas <jonpas33@gmail.com>
@jonpas jonpas requested a review from mharis001 July 23, 2021 14:13
Copy link
Member

@mharis001 mharis001 left a comment

Choose a reason for hiding this comment

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

Code looks good to me.

addons/interaction/XEH_postInit.sqf Outdated Show resolved Hide resolved
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
@jonpas jonpas modified the milestones: 3.14.1, 3.14.0 Jul 24, 2021
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

This is a little rough because of physX.
On stratis beach the "sun chairs" went flying into the ocean because of collisions.
note: I forgot to test, but maybe adding a frame delay between hide and create would help?

but it also adds a lot of functionality, it is default off and the setting has a warning, so I think it's ok to merge

@Dystopian
Copy link
Contributor Author

On stratis beach the "sun chairs" went flying into the ocean because of collisions.
note: I forgot to test, but maybe adding a frame delay between hide and create would help?

I found these chairs and now I hate them. Neither delay (even for some seconds) nor any of [fixCollision, fixPosition, fixFloating] functions help.

Bug looks VERY strange. Repro:

  1. place player on Marina Bay beach exactly near single chair but not close to other 2 chairs:
    interaction with terrain objects 1
  2. press interaction key, observe single chair replacing
  3. go close enough to other 2 chairs and press interaction
  4. sometimes observe chairs strange behavior: floating, flipping, flying for some meters.

If skip step 2 I can't repro.

@jonpas
Copy link
Member

jonpas commented Oct 12, 2021

I am good to merge this.

Regarding physics issues:

  • It's disabled by default
  • It has a warning on the setting

@PabstMirror PabstMirror merged commit 0c58d8b into acemod:master Oct 12, 2021
@Dystopian Dystopian deleted the interact-with-terrain-objects branch October 13, 2021 08:48
@jonpas jonpas added kind/feature Release Notes: **ADDED:** and removed kind/added feature labels Oct 14, 2021
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
* Add interaction with terrain objects

* Optimize with new commands

* Handle z-position under ground

* Add warning for setting

* Add parentheses to condition

Co-authored-by: jonpas <jonpas33@gmail.com>

* Add comments

* Add parentheses to condition

Co-authored-by: jonpas <jonpas33@gmail.com>

* Add parentheses to condition

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

* Add replacement configs to dragging

This reverts commit afc5abe.

* Fix validator error and optimize condition

Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants