- This topic has 14 replies, 2 voices, and was last updated 2 years, 7 months ago by Mikhail Luzyanin.
-
AuthorPosts
-
2022-04-25 at 10:03 am #51347yogyogParticipant
So, I’m creating a Verge3D scene where you navigate around a train-cab via hotspots. These hotsopts are little circles that point towards the camera using a Track To constraint (for some reason copy rotation dnt work for me) and I used the puzzle logic below to keep them the same size on screen no matter how far away from the camera.
The probelm is – at the edge of the screen they get larger. By quite a bit. The camera is quite wide angle as it’s a cramped enviroment.
Is there a way round this? I actually solved this in drivers https://www.youtube.com/watch?v=iq2l8EAiGvg&t=989s but its kind of a clunky solution which probably wont work in verge 3D and I currently have 10 hotspots which is a lot of extra empties to control all that.
Is there a way I can read the screen position of an object?
Attachments:
You must be logged in to view attached files.2022-04-25 at 10:16 am #51350Mikhail LuzyaninStaffCreate an HTML element with the text and bind it to an empty it’s will be easier. Otherwise you need to do some recalculations to set scale based on distance not only use pure distance as scale.
Co-founder and lead graphics specialist at Soft8Soft.
2022-04-25 at 12:46 pm #51352yogyogParticipantCheers. Any tutoirals on how to do that? It’s not text -it’s … well, it’s an object with an animated material that phases between two shades of blue… I’d settle for being able to use a PNG.
2022-04-25 at 1:59 pm #51358Mikhail LuzyaninStaffSorry no serious tutorial about thet but here I made a quick video how you can do it. The final project in attachement.
Attachments:
You must be logged in to view attached files.Co-founder and lead graphics specialist at Soft8Soft.
2022-04-26 at 2:18 pm #51391yogyogParticipantThank you! I’ll have a look at implementing that soon.
2022-04-27 at 7:11 am #51398Mikhail LuzyaninStaffCo-founder and lead graphics specialist at Soft8Soft.
2022-04-28 at 11:55 am #51443yogyogParticipant………..I’m not getting anything.
WHile it was really kind of you to upload the video, you uploaded it at 480p, so I’m not totally sure this is right. I’ve uploaded a screenshot of what I have.
Also – I didn’t have the same options for Modules on the beggining as you. I had:
Font Converter
IE 11
Legacy VR
PhysicsCould this be a problem? I think I have the latest version.
Attachments:
You must be logged in to view attached files.2022-04-28 at 12:05 pm #51446yogyogParticipantAnd one more thing? is there a way the image can be centered on the object center rather than it’s top-left pixel being on the object center?
2022-04-29 at 6:49 am #51470Mikhail LuzyaninStaffCould this be a problem? I think I have the latest version.
No.
And one more thing? is there a way the image can be centered on the object center rather than it’s top-left pixel being on the object center?
Yes. Just set background-position:center; this is all CSS basics, type CSS in the google for more options.
Co-founder and lead graphics specialist at Soft8Soft.
2022-04-29 at 7:14 am #51472yogyogParticipantSo…. should my code be working? Cos I’m getting nothing.
Thanks for your help.
2022-04-29 at 7:21 am #51473Mikhail LuzyaninStaffYes, it’s must work. Share the app I will look what wrong.
Co-founder and lead graphics specialist at Soft8Soft.
2022-04-29 at 12:07 pm #51492yogyogParticipantWhoops – I just posted this in entirely the wrong thread!
Thanks for your help
2022-04-29 at 4:51 pm #51504Mikhail LuzyaninStaffYou need to add . before “al’ in puzzle Create CSS Style, but only there. It’s important because all classes names must be named with ‘.’
Co-founder and lead graphics specialist at Soft8Soft.
2022-05-09 at 9:19 am #51827yogyogParticipantOK – thankyou for your help again and again – you’ve gone well beyond when it comes to your help with this, and I hope you don’t mind that I was away for a week, but ….
I have one more question to ask you.
It’s about cetering the button in the middle of the object.
I’ve added the line
background-position: center;
but it’s not …. centering it. It’s still with it’s top-left corner on the object centre, not the centre of the png on the object centre.2022-05-11 at 8:04 am #51899Mikhail LuzyaninStaffYou need to set Left to half of the width px, and top to half of the height. For example if widht 250px then set “left: 175px;” etc
Co-founder and lead graphics specialist at Soft8Soft.
-
AuthorPosts
- You must be logged in to reply to this topic.