Collision- A temporary solution

Hi Guys!

We are having some problems with the collisions in the tours.

(I hope i am missing a very simple setting and having all these issues)

The main problem is; people who are testing the tours can find some spaces/holes to be out of tour or to stuck.

As far as i experienced, the collision works automatically on the objects which are higher than the camera. By this logic, its blocking the camera from the walls, doors which are closed, the windows (sometimes there can be bugs via double side though). But its not working with lower walls, furnitures or other objects which are not too much high…

Also the collision may cause some problems in vr mode like this screenshot

One of our client managed to get his camera inside gap visible in these blinds and could not come out.

So; We have found a solution for this kind of issues for now. We are adding some blocker mesh to the areas which we dont want the camera to go trough…

The opacity value is 0 for this object. And the custom lightmap resolution is 1 (We had to make it 0 actually)


For now, we are able to block the camera to go inside a picture which is hanged on the wall. Or go inside the chairs etc…
But there are some dis-advantages of this;

  • The tour experiment is being harder as there are a lot of collisions and the path which we can use is narrower.
    -These blockers added +2 hours to the bake time (it may be because of custom lightmap resolution was “1”, we didnt have a chance to test it with “0” yet)

Edit: Tried with “0” its not changing the bake time
-We are not able to place the material pickers properly anymore. Because the blockers also block the pickers and placement has to be somewhere out of the blockers

I think the collision rules has to be changed. It can be a collision sphere object around the camera. That way the vr experience could be smoother and going trough the objects will be avoided?

You are right, currently the collision detection casts a single ray from the camera position and finds if this single ray intersects any geometry.

It seems like a good improvement to change this approach and cast several rays that come from a sphere that surrounds a camera (with maybe about 10 cm diameter).

I’m not sure if changing this approach further to block the camera from going above low furniture and low walls is a good generic approach. It will make navigating spaces harder, specially for users that are not experienced with 3D applications going around chairs and sofas may not be an easy task.

2 Likes

Hello @Jan, I have a similar situation with a client at the moment:
He asks me to keep users from getting too close to a wall or image, my solution is to put an invisible barrier but this barrier blocks users from interacting with extensions!
How can I maintain a larger distance from the walls without having to put up invisible barriers? What is the minimum height of an object that blocks passage through it?
Managing the heights of the invisible barriers and placing the extensions above that height can be a solution for now.

(edition: making tests I believe that it is not a determined height, is a barrier at the height of the camera, then the questions are: what is the default height of the camera? and what minimum width should the barrier have to stop the camera? this would allow me to place extensions above and below the barrier, but I still have the problem that if I get too close to the barrier it will avoid me from clicking on the extensions)

Can we increase the camera sphere perhaps? It can be a great solution!

regards
Jorge

Camera is a point at the height determined by the current view, so if you add a view at 165 cm above floor, the barrier would need to be at 165cm.

We have a global setting WALK.CLICK_MOVE_MIN_DISTANCE_TO_OBSTACLE = 0.7 that can be changed from a body-end.html. The distance is in meters, so the default is 70cm. But this setting affects only click or touch based navigation, not walking with keyboard. For walking with keyboard the min distance is currently fixed to 10cm.

Hi @jan, when you say keyboard do you include the scroll button and the mouse clicks? Or do the gestures I make with the mouse behave like gestures on a touch screen?
If I modify - obstacle = 2m - would that modify the min distance if I only navigate with the mouse?
Would there be the possibility of selectively modifying those 10cm for certain tours?

For scroll it is also 10cm, for click it is 70cm. Yes, we will add a way to modify this 10cm.

1 Like

Thanks @jan, I hope this modification will be no to hard to implement and coming soon.

When some clients without 3d experience are still or stuck in a corner and doesn’t understand what they are looking in front of a wall, they symple go away! Maybe this modification help them.

Do we have more controls on collision, like in unity, I wanna to add collision box in my scene, whenever i reach the collision box i wanna to trigger an event, is it possible to have this much control on collision??

If you want to cause an event when entering a box, then an extension with a Camera Volume trigger may be what you’re looking for. You can trigger any extension (including a script) by entering/exiting a Camera Volume trigger (a box or a sphere). Is this what you’re looking for?

Yeah box/sphere should be transparent, I Checked in the extension section, couldn’t find anything related to Camera Volume Trigger, how to achieve it??

To use a camera volume trigger for an extension you need first to create an extensions, then a pop-up like this will appear and you can choose any of the listed extensions. You can read about the possible extensions here: https://help.shapespark.com/hc/en-us/articles/360010148837-Extensions

To choose a camera volume as the trigger for the extensions click the + near Trigger in the pop-up.
image

A pop-up with the trigger configuration should appear and you should be able to select a camera volume trigger.
image

Whao!!! Crazy, It solved my problem. Thank you for helping me out

I had one more problem, regarding door rotation, I have posted here, Can you please help that also

1 Like