playMaker

Author Topic: Fighter 3D Camera (Camera for a 3D fighting style game)  (Read 6487 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Fighter 3D Camera (Camera for a 3D fighting style game)
« on: June 06, 2015, 04:32:56 PM »
Original script from: http://hutonggames.com/playmakerforum/index.php?topic=10493.0

Originally for 3D Fighting game but can be used for anything and it does have some interesting camera movement with the right settings.

Get it from Ecosystem or https://snipt.net/dudebxl/  *** (only Fighter3DCamera.cs on Ecosystem)

FighterCameraAdvance is a different effect (3D or 2D compatible) but it is adapted for 3 or more players.

Update: Action on ecosystem has been updated. FighterCameraAdvance => FighterCameraAdvance2d (the old one will remain here as they are a bit different) & new action which is similar but different  -  TargetsTrackingOrthoCamera ** both on ecosystem.

enjoy
« Last Edit: January 02, 2016, 12:19:22 PM by dudebxl »

mdotstrange

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #1 on: June 07, 2015, 02:38:11 AM »
You're awesome for creating all these new actions!  :)

Thank you!
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

cloud03

  • Full Member
  • ***
  • Posts: 230
  • Viva Playmaker!
    • View Profile
    • Milkish Game Studios Blog
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #2 on: June 07, 2015, 09:53:29 PM »
Wow, I really believe this is going to be useful for a lot of people, thanks a lot for creating this!

LogLady

  • Full Member
  • ***
  • Posts: 146
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #3 on: June 08, 2015, 11:30:45 AM »
Thanks for converting this to an action! Would it be possible to add 2 more characters so the camera could track 4 players?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #4 on: June 09, 2015, 08:31:58 AM »
Bump

New camera action added.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14338
  • Official Playmaker Support
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #5 on: June 09, 2015, 10:53:06 PM »
Hi,

 I realized that if you search for "fighter", it won't list it, because I htink the snipt search engine get's confused with the class name parsing or it searches for whole words only. I have raised an issue to make sure of the behavior to expect:

https://github.com/nicksergeant/snipt/issues/153

meanwhile, I would suggest you put in the script comment itself the search words, and then it will return it properly if you search for "fighter". As long as the whole word is somewhere int he script it will find it. So "// Keywords: Figher 3d Camera"  will do the job ( I have such keywords json property on metadata for some existing content on github.

Bye,

 Jean


dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #6 on: January 02, 2016, 12:19:36 PM »
*** Update bump

AlexarahX

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #7 on: January 08, 2016, 06:31:45 PM »
Hi dudebxl do you plan on giving documentations or a tutorial on how to use this because Unity 5 still being typical Unity always manages to display errors and does not give reasonable detail as to what's causing it. I swear bros Unity 5 can be a low class engine at times.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #8 on: January 08, 2016, 06:53:42 PM »
Warning or error?

If warning then ignore.. but it should work as i was using it the other day in Unity5.2.

No doc, just play around until you find something you like  ;D
« Last Edit: January 08, 2016, 09:30:07 PM by dudebxl »

AlexarahX

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #9 on: January 09, 2016, 12:36:55 AM »
 :-\ Hmm so you're using Unity 5.2 but I'm using 5.3 so is it possible that the changes that were possibly made in the newest version of Unity could cause these errors because I can't figure them out. Don't know if you noticed dudebxl but the Unity Team often make too many changes to every new version without even thinking of how it will affect the community. If I have to I'll try the version you're using and I'll let you know if that works. ;)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #10 on: January 09, 2016, 05:33:48 AM »
Can you post here the error? Would be good to know what is going on..

dorkirt

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #11 on: January 20, 2016, 07:44:11 AM »
Hey

 Once again, thanks for your actions, really usefull!

I am getting this:

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.FighterCameraAdvance.GetInterpolation (Single t, LerpInterpolationType type) (at Assets/_MMO GAME/Playmaker Custom Actions/FighterCameraAdvance.cs:309)

Thanks !

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #12 on: January 20, 2016, 08:22:30 AM »
euh.. I don't know.

try with 2 cubes in the scene and see what happens (replace camera.. and Npc gameobject). If it works then it is the objects you are using.

Let me know

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Fighter 3D Camera (Camera for a 3D fighting style game)
« Reply #13 on: October 13, 2018, 04:06:12 AM »
Hi,

Just tried FighterCameraAdvance2d and in
2018.2.7f1
Playmaker: 1.9.0.p4

it says:

Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.FighterCameraAdvance2d.CalculateCameraPosAndSize () (at Assets/PlayMaker Custom Actions/Camera/FighterCameraAdvance2d.cs:271)
HutongGames.PlayMaker.Actions.FighterCameraAdvance2d.OnLateUpdate () (at Assets/PlayMaker Custom Actions/Camera/FighterCameraAdvance2d.cs:154)
HutongGames.PlayMaker.FsmState.OnLateUpdate () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:277)
HutongGames.PlayMaker.Fsm.LateUpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2789)
HutongGames.PlayMaker.Fsm.LateUpdate () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2094)
PlayMakerLateUpdate.LateUpdate () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerLateUpdate.cs:21)

edit:
the simpler: TargetsTrackingOrthoCamera action works.

Br,
szomaza
« Last Edit: October 13, 2018, 04:29:06 AM by szomaza »