Maaco Posted March 24, 2018 Share Posted March 24, 2018 Hi, The TriggerChangeMap doesn't seem to work with the VRPlayer script. How can I continue to a new map in VR? Thanks, Maaco Quote Link to comment Share on other sites More sharing options...
Josh Posted March 25, 2018 Share Posted March 25, 2018 This is an interesting problem because with the VR player, there is no collision, there is just the real player walking around themselves. So this can be solved by adding a collideable object to the player's headset. I don't have an example of this right now, but it is pretty easy to do. I think I will make this standard in 4.6. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Maaco Posted March 25, 2018 Author Share Posted March 25, 2018 Hi Josh, Thanks for your answer. I just did some tests where I had a box dropped (prop with a mass) onto the ChangeMap Trigger and the weird thing is that it will only load the new map when I have the FPS Player script attached to the player model. Once I use the VR Player script on the player model the map doesn't want to load when the same box is dropped. Quote Link to comment Share on other sites More sharing options...
Josh Posted March 25, 2018 Share Posted March 25, 2018 30 minutes ago, Maaco said: Hi Josh, Thanks for your answer. I just did some tests where I had a box dropped (prop with a mass) onto the ChangeMap Trigger and the weird thing is that it will only load the new map when I have the FPS Player script attached to the player model. Once I use the VR Player script on the player model the map doesn't want to load when the same box is dropped. The vr player has no collision shape or mass Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Maaco Posted March 25, 2018 Author Share Posted March 25, 2018 The box I used for colliding with the trigger was dropped independently of the player entity (just falling down by gravity) and did have a mass and collision shape. That seems to work while having the FPSplayer in the scene (even when the player is not colliding with the trigger) but not while the VRplayer is being used. In other words: when this particular box collides with the trigger while looking at it 'through' the FPS player it works, but while looking at it 'through' the VR Player it doesn't. Quote Link to comment Share on other sites More sharing options...
Maaco Posted March 26, 2018 Author Share Posted March 26, 2018 After doing some more testing using an (player independent) object to collide with the ChangeMapTrigger the new map loads without a problem in the normal (FPS Player) setup. In the VR environment the trigger gets activated, but then the game crashes with the following error message: "modeOpenGL error GL_INVALID_OPERATION" As I'm not sure what exact conditions are required (in the next map?) for successfully loading a new map I think it's best for me to just wait for 4.6. Other collison scripts are working perfectly in VR (e.g. I've made a keycard you can pick up with the (touch)controllers and hold it next to a cardreader to open a door), so I guess this issue is somewhere in the map changing/loading system? Quote Link to comment Share on other sites More sharing options...
Maaco Posted March 28, 2018 Author Share Posted March 28, 2018 Well, I seem to be running this topic all by myself answering my own questions, but thats allright Anyway, for anyone that cares: I at least solved the trigger collision problem for the VRPlayer script by simply adding "self.entity:SetParent(camera)" to the UpdateWorld function in the VRPlayer script (as Josh kinda already suggested) So now the player model (with mass and a collison shape) follows wherever the VR camera goes. Only problem with this quick fix is that the player can't use moving platforms or elevators as the camera isn't influenced by them. Loading a new map still doesn't work but triggering other events by player collision at least work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.