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

[Feature Request] Enable ObjectInColliderCondition have multiple TriggerObject #288

Open
AronSchaub opened this issue Feb 4, 2025 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@AronSchaub
Copy link

AronSchaub commented Feb 4, 2025

ObjectInColliderCondition could work with a MultipleScene ObjectProperty. It currently only has a single SingleRefObject:

public SingleScenePropertyReference<ColliderWithTriggerProperty> TriggerObject { get; set; }

you would just need to loop through all:

counter += Data.TriggerObject.Value.IsTransformInsideTrigger(sceneObject.GameObject.transform) ? 1 : 0;

you can then put a warning, that for the fast forward the first in list will be used.

@AronSchaub AronSchaub changed the title [Feature Request] Make ObjectInColliderCondition [Feature Request] Enable ObjectInColliderCondition have multiple TriggerObject Feb 4, 2025
@poetter-sebastian poetter-sebastian added good first issue Good for newcomers enhancement New feature or request labels Feb 4, 2025
@poetter-sebastian
Copy link
Contributor

Heya Thanks for the feature request.

This could be a nice "good first issue".

@stgrosshh
Copy link
Contributor

stgrosshh commented Feb 9, 2025

ObjectInColliderCondition could work with a MultipleScene ObjectProperty. It currently only has a single SingleRefObject:

VR-Builder/Source/Core/Runtime/Conditions/ObjectInColliderCondition.cs

Line 43 in 0f94a59

public SingleScenePropertyReference TriggerObject { get; set; }
you would just need to loop through all:

VR-Builder/Source/Core/Runtime/Conditions/ObjectInColliderCondition.cs

Line 135 in 0f94a59

counter += Data.TriggerObject.Value.IsTransformInsideTrigger(sceneObject.GameObject.transform) ? 1 : 0;
you can then put a warning, that for the fast forward the first in list will be used.

What would be the use case for that and how would you decide how many of the TargetObjects have to go in which TriggerObject?

@poetter-sebastian
Copy link
Contributor

poetter-sebastian commented Feb 10, 2025

@stgrosshh an use case could be a two handed tool.

@AronSchaub
Copy link
Author

The use case is simply that I want to have the possibility to put multiple objects into multiple possible snap zones without the need for multiple conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants