Hello everybody! I’m trying to make a specific condition for an object to become visible only in the inner view camera and that disappears when using any outer view. It is possible? Perhaps some example of this kind of code would be very useful. I thank you in advance!
I have moved your topic into the SDK category for assistance.
@Hester40MT Thank you!
Reading the Camera State variable is perhaps the most effective way of determining which view you are currently in.
Thanks for the answer @antsair031 !
I looked at the documentation at the given link and it was very helpful, but I still couldn’t solve the problem. By adding the indicated line of code, my goal is to make the specific object visible only on the outside, but this way it doesn’t work, with the object remaining visible on the inside as well. Any idea?
<Component ID="Object" Node="Object"> <UseTemplate Name="ASOBO_GT_Visibility"> <VISIBILITY_CODE>(A:CAMERA STATE, Enum) 3 != and</VISIBILITY_CODE> </UseTemplate> </Component>
Couple of things…
The enum value of camera state for the cockpit cameras is 2, but in your code you’ve said ‘not 3’ so it will return true and be visible if any camera other than external/chase is active. Not quite what you want I think.
You have a superfluous ‘and’ at the end, so the code is expecting two expressions that both must be valid to return true, but you’re only giving it one expression.
(A:CAMERA STATE, Enum) 2 ==
That expression should only return true if a cockpit camera is active.