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

Teleport property TRNG-102 #91

Merged
merged 3 commits into from
Mar 22, 2021
Merged

Conversation

Gusinuhe
Copy link
Contributor

@Gusinuhe Gusinuhe commented Mar 8, 2021

Description

Implements a Teleport Property based on a Teleportation Anchor.
The Teleport Property can be configured as a Default Teleportation Anchor :

image

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Add a teleport condition in any step and test either teleporting and skipping the step on all available rigs.

Related To

@tomwim
Copy link
Contributor

tomwim commented Mar 10, 2021

Findings (might be related to one of the other PRs but I collect them all here):

Note: Only tested in DM for now

  1. Should be both capitalized. Maybe even moved to https://github.com/Innoactive/Basic-Conditions-And-Behaviors ?
    image

  2. Teleport Point probably should be a trigger
    image

  3. Warning stays after being fixed
    image

  4. In Desktop Mode the TeleportPoint should have a Mouse Over Highlight (probably out of scope in this PR)

  5. Teleport Point should not throw a shadow (both child mesh objects). We could even think about a cool animation to make it more visible :)
    image

  6. Rotation is not set after teleportation, not sure if intended though. But we know from one of our customers, that they have a predefined rotation after the trainee teleported to the point

Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
}
}

private void ConfigureDefaultTeleportationAnchor(TeleportProperty teleportationAnchor)
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be good to be able to overwrite this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe, in general, it would be good to hook up custom actions when the fix button from the step inspector is hit.

I also thought about this (after the meeting with Sebastian), I'll say it is out of scope for this PR but we definitively should keep an eye on how to provide a way to do custom configurations.

Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
Runtime/Properties/TeleportProperty.cs Outdated Show resolved Hide resolved
Runtime/Properties/TeleportProperty.cs Outdated Show resolved Hide resolved
Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@tomwim tomwim left a comment

Choose a reason for hiding this comment

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

Capitalize anchor and customReticle

I also see all (most) points from @SimonTheSourcerer

Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
@Gusinuhe
Copy link
Contributor Author

Gusinuhe commented Mar 10, 2021

1.- Those assets are interaction effects, they make more sense in the XR Component.
2.- Not necessarily, Teleportation Area and Teleportation Anchor are interactors, usually these are not set as trigger but they still work if they are.
3.- @SimonTheSourcerer Hilfe! 😱
4.- Agree, perhaps in https://github.com/Innoactive/Creator-Pro/pull/54
5.- Fixing...🧑‍🏭
6.- Yeah... I wanted to talk with @tomwim or @SimonTheSourcerer about it... the teleportation anchor does set the rig into the desired rotation, but there is something in the Desktop Mode that overrides the rotation and I could not find what was it.

tomwim
tomwim previously approved these changes Mar 12, 2021
Copy link
Contributor

@tomwim tomwim left a comment

Choose a reason for hiding this comment

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

I get that the anchor prefab is an interaction effect, on the other side you would have to also put this in VRTK or MRTK then. In the end I dont care too much

Editor/Properties/TeleportPropertyEditor.cs Outdated Show resolved Hide resolved
@vued
Copy link
Contributor

vued commented Mar 15, 2021

Minor/Trivial: I'd find it cleaner if the visuals would be connected stronger to the collider (which currently is in the parent) and they would not be the child of the anchor. I understand the anchor as the place where the trainee will be after teleporting. In the current setup, the following two (rare!) use cases are not supported well: 1. The training designer wants to replace the visuals with other geometry and has to change the collider in another object. Note: A collider in the child would be sufficient if the property would not enforce the collider on this object. 2. After clicking on the teleportation spot, the trainee's position should be adjusted, e.g. higher/lower for whatever reason. Note: I don't think that this really makes sense but this use case is the idea behind having the anchor in the first place, right?

@vued
Copy link
Contributor

vued commented Mar 15, 2021

Trivial:
In desktop mode, if the property is activated via 'unlocked objects' without having a teleport condition in this step, the teleport spot is shown but you cannot teleport there. I assume it's possible in VR (have to test) and further assume it's because there is no condition that can force fast forward. Maybe take this as input for your consideration for your solution discussion regarding desktop mode interaction decoupling from XRI?

@Gusinuhe
Copy link
Contributor Author

Minor/Trivial: I'd find it cleaner if the visuals would be connected stronger to the collider (which currently is in the parent) and they would not be the child of the anchor. I understand the anchor as the place where the trainee will be after teleporting. In the current setup, the following two (rare!) use cases are not supported well: 1. The training designer wants to replace the visuals with other geometry and has to change the collider in another object. Note: A collider in the child would be sufficient if the property would not enforce the collider on this object. 2. After clicking on the teleportation spot, the trainee's position should be adjusted, e.g. higher/lower for whatever reason. Note: I don't think that this really makes sense but this use case is the idea behind having the anchor in the first place, right?

I removed the collider from the property and add it to the base (floor) this will reduce most of the issues and will be more transparent for the training desingners.

@Gusinuhe
Copy link
Contributor Author

Trivial:
In desktop mode, if the property is activated via 'unlocked objects' without having a teleport condition in this step, the teleport spot is shown but you cannot teleport there. I assume it's possible in VR (have to test) and further assume it's because there is no condition that can force fast forward. Maybe take this as input for your consideration for your solution discussion regarding desktop mode interaction decoupling from XRI?

Not sure exactly why but we can address that in the locomotion ticket.

@Gusinuhe Gusinuhe force-pushed the feature/teleport-condition-TRNG-102 branch from df2bb8e to 6b06d12 Compare March 16, 2021 15:59
tomwim
tomwim previously requested changes Mar 17, 2021
Tests/Runtime/TeleportConditionTest.cs Outdated Show resolved Hide resolved
Tests/Runtime/XRTestUtilities.cs Show resolved Hide resolved
@Luphoxa
Copy link

Luphoxa commented Mar 17, 2021

Test Results with Desktop Mode:

  • fix it button adds no collider but warns that it is missing, so that's alright. In desktop mode, it makes no difference where the collider is, if it's near the object, in the object, or far away. Need to check how this behaves in VR.
  • minor: It would be nice if the teleport point could be highlighted in some way when hovered so the trainee knows that it can interact/teleport when clicking.
  • It's nice that teleport points are locked by the restrictive environment.
  • Important in my opinion: Unlocking them by adding them to the unlocked objects makes the trainee able to see the teleport point, but the trainee is unable to actually teleport there. Probably should be possible if it is unlocked.

@Gusinuhe Gusinuhe force-pushed the feature/teleport-condition-TRNG-102 branch from 4ad6621 to 7966c6e Compare March 17, 2021 23:16
@Luphoxa
Copy link

Luphoxa commented Mar 18, 2021

Test Results with the Oculus:

  • trivial: my teleport ray becomes red when I target the teleport spot if my plane is a teleport area (do we support usage of both?)
  • probably okay: if my area is not a teleport area and the teleport spot is too far away I am unable to get there. I would need to create a path of points.
  • minor: when I hit the side of the teleport point the "destination circle" can be showed sideways (see gif)
    TeleportPointSidePortSMoll
  • good: in VR, teleport points unlocked with the restrictive environment also can be teleported to
  • in desktop mode manually enabled teleports can't be teleported to
  • minor: enable behavior doesn't enable teleport points. This could be interesting if you want to enable them for longer than one step.

Config:
Unity 2019.4.10f
Windows 10
Oculus Quest

@Gusinuhe
Copy link
Contributor Author

Test Results with Desktop Mode:

  • fix it button adds no collider but warns that it is missing, so that's alright. In desktop mode, it makes no difference where the collider is, if it's near the object, in the object, or far away. Need to check how this behaves in VR.

Good catch, I'll take a look but that probably belongs on another component.

  • minor: It would be nice if the teleport point could be highlighted in some way when hovered so the trainee knows that it can interact/teleport when clicking.

It can.

  • It's nice that teleport points are locked by the restrictive environment.

👌

  • Important in my opinion: Unlocking them by adding them to the unlocked objects makes the trainee able to see the teleport point, but the trainee is unable to actually teleport there. Probably should be possible if it is unlocked.

Teleportation in desktop mode is not yet supported, the desktop mode "fakes" all property interaction so it can work.

@Gusinuhe
Copy link
Contributor Author

Test Results with the Oculus:

  • trivial: my teleport ray becomes red when I target the teleport spot if my plane is a teleport area (do we support usage of both?)

Idk, this is a pure XRIT behavior.

  • probably okay: if my area is not a teleport area and the teleport spot is too far away I am unable to get there. I would need to create a path of points.

🤷‍♂️

  • minor: when I hit the side of the teleport point the "destination circle" can be showed sideways (see gif)
    TeleportPointSidePortSMoll

This should be resolved in one of the latest commits, is your branch up to date?

  • good: in VR, teleport points unlocked with the restrictive environment also can be teleported to

👍

  • in desktop mode manually enabled teleports can't be teleported to

This behavior is not implemented yet.

  • minor: enable behavior doesn't enable teleport points. This could be interesting if you want to enable them for longer than one step.

Perhaps because the teleport points are locked, enable behavior only enables a Game Object but it does not unlock its properties.

@Gusinuhe
Copy link
Contributor Author

@tomwim basic interaction assets were moved from the XR Component into the Basic Interaction (Innoactive/Basic-Interaction-Component#45).

@Luphoxa
Copy link

Luphoxa commented Mar 19, 2021

Testresults rechecked:

  • trivial: my teleport ray becomes red when I target the teleport spot if my plane is a teleport area (do we support usage of both?)

Idk, this is a pure XRIT behavior.

👍

  • probably okay: if my area is not a teleport area and the teleport spot is too far away I am unable to get there. I would need to create a path of points.

🤷‍♂️

👍

  • minor: when I hit the side of the teleport point the "destination circle" can be showed sideways (see gif)
    TeleportPointSidePortSMoll

This should be resolved in one of the latest commits, is your branch up to date?

My branch was up to date. I also pulled the newest branch state a few minutes ago before retesting.

  • in desktop mode manually enabled teleports can't be teleported to

This behavior is not implemented yet.

👍

  • minor: enable behavior doesn't enable teleport points. This could be interesting if you want to enable them for longer than one step.

Perhaps because the teleport points are locked, enable behavior only enables a Game Object but it does not unlock its properties.

Okay 👍
We probably should create a ticket to have the possibility to have teleport points active for a longer time then :)

Additional notes:

  • found no additional issues

Config: state from now
Teleport property TRNG-102 #91
Innoactive/Creator-Pro#54
Innoactive/Basic-Interaction-Component#45
rest develop
Oculus
Windows 10

Copy link

@Luphoxa Luphoxa left a comment

Choose a reason for hiding this comment

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

If all change requests are addressed and we decide that the minor bug with the "side circle" should be deferred and put into a ticket I can approve this.
Dismiss this otherwise :)

@Gusinuhe Gusinuhe requested a review from tomwim March 19, 2021 15:42
@Luphoxa
Copy link

Luphoxa commented Mar 22, 2021

I tested this again today and my teleport points are pink now. Is this because it is linked to the default highlight color now?
image

@Gusinuhe
Copy link
Contributor Author

Gusinuhe commented Mar 22, 2021

I tested this again today and my teleport points are pink now. Is this because it is linked to the default highlight color now?

image

Since the assets were moved from this repository to a dedicated one, you need to re generate the teleport property.

BTW this issue will not be present for any user, this happened probably because you already had a property generated with the old asset location.

@Gusinuhe Gusinuhe dismissed tomwim’s stale review March 22, 2021 15:37

Dismiss due to the lack of response, all changes are already addressed.

@Gusinuhe Gusinuhe merged commit 9736451 into develop Mar 22, 2021
Copy link
Contributor

@tomwim tomwim 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

@Gusinuhe Gusinuhe deleted the feature/teleport-condition-TRNG-102 branch March 22, 2021 15:37
@ci-innoactive
Copy link
Collaborator

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants