playMaker

Author Topic: Spawing left / right handed player  (Read 2526 times)

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Spawing left / right handed player
« on: August 11, 2017, 07:04:56 AM »
Hi all I have a problem in that I need a right and left  ( Oculus touch) handed player in my game...
I can of course make two games duplicating the left and right scenes, but that almost doubles the size of the game! Or I can spawn in (create object) or activate the player (activate game object ) swapping each over while in the game . The latter unfortunately  just slows down game play and continuity . I'm  sure there is a way to globally sporn  in one or the other from the outset and not duplicate scenes but I cant figure how to do it, any ideas or examples ??     
« Last Edit: August 11, 2017, 07:18:06 AM by Hugo111 »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Spawing left / right handed player
« Reply #1 on: August 11, 2017, 01:04:20 PM »
Hi,
i have no experience with oculust

What exactly needs to be changed?

Maybe a few arrays (game object / position / rotation / material / other) can help.
If left handed trigger the arrays to change positions / rotations / etc.

And i would have the option to chose left/right only on the start of the game or in a option menu on the main menu (when the main game is not yet loaded)

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Spawing left / right handed player
« Reply #2 on: August 12, 2017, 05:51:48 AM »
Hi thanks for your reply ! So I would I suppose have both players in the same position in each of the scenes in the correct position , one activated and one not activated, how would I create a global action to switch between one or the other from the outset in the First scene ? menu.  This is my game www.ufencevr.com which will give you an idea of what I mean, and I have slightly different avatars (fencers) setups in each scene so would need to choose each (one or the other ) from the outset  . Ta 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Spawing left / right handed player
« Reply #3 on: August 12, 2017, 10:09:40 AM »
Hi,
I think i would go for 2 prefabs 'player' one left handed and one right handed.

in a menu before the game start the player can select left handed or right handed
when loading the game load in the appropriate 'player'

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Spawing left / right handed player
« Reply #4 on: August 12, 2017, 12:20:32 PM »
Hi so you are saying have two of the same scenes, one with one left  hand type and the other same scene with the right hand type ? And move on a different  but the same scene flow with each of the different fencers ? Is that the only way ? Best H

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Spawing left / right handed player
« Reply #5 on: August 13, 2017, 12:51:57 AM »
Hi.
No, only 1 scene but 2 prefabs from the player.
The right hand player standard in the scene and the Left hand player in a resource folder.

Just to be sure, do the enemies also need to change when left hand is chosen?

If so maybe it would be better you mirror the camera
and flip the controls

Place the attachment i included on your camera.

If this is what you need i can make an action for it :)

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Spawing left / right handed player
« Reply #6 on: August 13, 2017, 03:48:05 AM »
Hi Thanks, but the opponents enemies don't need to flip. I will take a look at that anyway thanks . Only the left and right handed players need to be slightly different in each scene. Ive just seen a demo on how to make arrays, I think that may be the answer if I can work it out ! Just turn one or the other on or off ! Do you know of any appropriate tutorials on the them ? H

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Spawing left / right handed player
« Reply #7 on: August 13, 2017, 04:27:31 AM »
Hi,
You can find several tutorials here :

https://hutonggames.fogbugz.com/default.asp?W548

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Spawing left / right handed player
« Reply #8 on: August 13, 2017, 07:13:38 AM »
Thanks H