Jump to content

Hit Box Usage not working for new VOs


Recommended Posts

I've created hit boxes in some new Virtual Objects that I've created. When I try to use them utilizing the "snap" transition they don't respond to the left mouse click on the hit box as other native hit boxes do. The Tower of Hanoi and  ADCDrawer hit boxes work fine, but the hit boxes I create for my private assets don't work. What am I missing? (See attached file for the hit box I created in a biosafety cabinet. The hit box shows up in the simulation, but it just doesn't respond when I left click on it.)   

 

    

Hit Box Q 8-10-2022.docx

Link to comment
Share on other sites

Hi Lab Sim Builder. I have looked at your asset setup and my guess is that the method of setup for your object his covering the hitbox.

Objects in HyperSkill have a Rendering Component which is what you see as well as a Physics Component called a Collider which is how your computer tries to determine where the boundaries of an object are. What I suspect has occurred is that you have utilized a very rough setup for your object in question which has essentially just created a large box around your object. To adjust this you will need to go to your Virtual Object, select the component that is causing the issue, and change its Collider type from Box to Mesh or Mesh Convex (most likely Mesh). This will cause the system to match the Physics component to that of the Mesh Renderer and should address your issue.

Please let me know if this fixes your issue.

BoxToMeshCollider.png

Link to comment
Share on other sites

Still having issues with the hitboxes. I've created 7 hitboxes (L01, L02, L03, Center, R03, R02, R01) in the private VO below. Each Hitbox has a collider set to "Mesh" as indicated below:

image.thumb.png.abf313bb4b9eca7a3468b923fdf67255.png

Here is the state logic for putting Red Cube1 into position L01 :

image.thumb.png.69b1e5305e3da2cdef992a4b9d58acaf.png

image.thumb.png.76a8acfd25dedf2855ec7c211f1c96ae.png

Unfortunately Position L01 will not respond to the Left Button Mouse click when the reticle is over the Hit box.

As you previously advised changing the Collider from "Box" to "Mesh" appears to have no effect in this case.

Can you help?   

image.png

Link to comment
Share on other sites

Sure thing, if you would please go to your object in your repository (LabconcoFBX) and press the share button on the object. Please type in the account siind@siminsights.com. This should share the object with me and I will be able to take a look at it myself.image.thumb.png.d1f5b97a5e56193847dea99832d6b00d.png

Link to comment
Share on other sites

made some progress! By moving the hit boxes outside of the interior of the VO (LabconcoFBX) I was able to get 6 out of the 7 working (I added one since the last screenshot above). The 7th one though will not snap into the R03 position:

image.thumb.png.233b436f66ef23d1821a502e77e2d19c.png

 

Here is the state logic:

image.thumb.png.010aad87dca9d5510950c4b40f9fc7d0.png

I'll share the VO with you. All Collides are Mesh BTW...Please advise

image.png

Link to comment
Share on other sites

I am not experiencing the same issue, everything with the object seems to be working as expected. Let me just walk through the steps.

In the Virtual Object tab, set ALL components of the object attributes from Box to Mesh. In practice this is every object under Labconco_Protector_XStream_Laboratory_Hood (starting from ACID, axis_of_rotation, etc.)

image.thumb.png.37c0b1d5b754264bdb72666aefbfee4a.png

 

My authored scenario is much the same as yours. I have brought in the LabconcoFBX and a cube.

image.thumb.png.cbf00248a49f30d50eeab8f24bfcf915.png

 

I have kept my authoring to be the same as well, but I did add 3 hitboxes called Testing Inside, Testing Inside Left, and Testing Inside Right to mine. I left the selection for Highlight snap zone selected to make diagnostics easier.

image.thumb.png.ae33a0c0c1e69e3409bcf7fd6301bae3.png

Here is a video of it working properly on my end as well:

 

So in conclusion, from my end, I don't see anything wrong with this setup or object and it is working as expected. Please let me know if you are still having issues or if you need me to go into any further detail for any step. I suspect that your issue is with the first step where not every attribute was set to mesh.

Link to comment
Share on other sites

I checked all the items as you suggested and they show up as mesh. I ran the simulation again with the same result: the 7th hitbox does not show up. I'll share the sim with you perhaps you can run it and see if the 7th hitbox shows up for you (or not). 

 

image.png

Link to comment
Share on other sites

So that hitbox should R01. Please give me edit access to the simulation when it is shared if you would like me to confirm that R01 is setup to receive an object but in my test with your same object it is working properly. To give someone edit access go through the sharing menu the same as you did before but in this dropdown here select Editor.

image.png.c39797ab308712340cfb2c9665bebd74.png

Link to comment
Share on other sites

It seems you never gave me editor permissions to review your state machine setup. Could you please give me editor access as the hitboxes seem to be working appropriately on my end. As a reminder, the hitbox on the FURTHEST end on the right is R01 based on how you have it set up. It seems like that is the one that you have missing. Not R03. If you would like me to take a look at your Global Triggers to confirm this you will need to share the simulation with me giving me editor access rather than view access.

Link to comment
Share on other sites

Thanks for the feedback! After reading your observation I went back and re-checked the R01, R02, R03 entries and found the error and fixed it. Now it all works fine with the hitboxes located outside of the cabinet. Next I want to see what happens if I try to place the hit box inside the cabinet within line of sight of the reticle (i.e. not obscured by the clear glass pane in the upper half of the front opening of the cabinet)... 

Link to comment
Share on other sites

Now I seem to be having an update problem: I changed the Z location of the hit boxes so that they fall inside the cabinet. I saved the modified VO (and later checked to confrim that the hitbox locations had indeed changed) and then opened up the simulation only to find that the hit box locations remained unchanged while running the simulation.

I then reopened the simulation editor and deleted the LabconcoFBX VO from the simulation reimported it and reding the consistent logic modules (since the references had all been deleted). I restarted the simulation only to find that the hit box positions remained unchanged i.e. still outside of the cabinet!

 

Can you explain what I'm doing wrong?  

Link to comment
Share on other sites

It occurred to me that if I made a copy and ran the simulation that might respond differently...and it did! In the copy simulation the hit boxes had moved to the interior of the cabinet. 

Why didn't the edits take effect in the original simulation and only show up in the copy? 

Here's a shot of the operational copy:

image.thumb.png.43f1261eac7047c0b63945b8718cbfee.png 

Link to comment
Share on other sites

I am not 100% positive but I suspect that your values were cached by your system and were not updated until you restarted the application or brought the object into a new simulation. I will report this issue to the developers and have them look into this issue. Thank you for reporting this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...