playMaker

Author Topic: Camera tracking action similar to “Targets Tracking Ortho Camera”?  (Read 2750 times)

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
I am making a 2d game with multiple local players and I need an action to track all players tagged as player.. The action mentioned in the title works exactly the way I need it too except I need a sensitivity option because my Ai bounces at the edge of the screen sometimes and it makes the camera bounce too. I just need  there to be a buffer of some kind where the camera doesn’t bounce or at least not as much.. Any help would be very appreciated. Thanks!
Most Recent Published Games:
Juicy Theater - Android

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #1 on: September 25, 2018, 03:14:12 AM »
Hi.
I'm not exactly sure what you mean.

Maybe you can use a clamp to the edge of the screen.

Should the ai bounce at the edge of the screen?

can you give some more information?

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #2 on: September 25, 2018, 04:43:06 PM »
Hi djaydino,

I’m not sure how else to explain. I will post a video sometime later if I can’t describe it any better.

So I have two players on screen at once(one is an AI). The AI has a steering rig for avoidance and it works great but sometimes (rarely)  the AI gets stuck or confused and goes back and forth over a small distance to try and catch up with the player. The AI getting stuck isn’t the real problem, as I came up with a way to solve that that works for me and my game. The problem is while the AI is trying to sort out how to regroup with the player and is going back and forth,  the camera is constantly zooming in and out because the targets (the players characters) for the tracking action are getting closer as further away because of the AI sorting out the path.

I just need some kind of sensitivity option so when the the players do have a bit of erratic movements the camera doesn’t zoom in and out so fast or often to keep track of them.

Please let me know if I explained it right or if I should do a short video on what is happening. And thank you for taking the time to look at my post!
Most Recent Published Games:
Juicy Theater - Android

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #3 on: September 26, 2018, 01:21:07 AM »
Hi.
I believe i understand what the issue is, but i think its very depending on your setup to find a solution.

Maybe you can make a small scene with the issue and send it so i can have a look?

or maybe a video showing your setup and the issue.

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #4 on: September 26, 2018, 11:39:53 AM »
It's easier to make a video:

https://www.youtube.com/watch?v=3yO6OYLoRnY

So my camera just has the one action mentioned in the original post. You can see the camera is bouncing when the AI is moving erratically. I just want to reduce the movement amount of the camera when this is happening.
Most Recent Published Games:
Juicy Theater - Android

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #5 on: September 27, 2018, 01:36:49 AM »
Hi.
What comes in my mind 1st :
Have a separate object to smooth follow the enemy
With some raycasts on each side to check if there is a wall and if there is a wall prevent the movement to that direction.
and the camera should follow the separate object.

There might be other solution and i am not 100% sure if it would work well as i did not test this,
But if you could send a scene with the ai and player i can give a go at it to find the solution.
As it also kind of depends on the AI system.

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Camera tracking action similar to “Targets Tracking Ortho Camera”?
« Reply #6 on: September 27, 2018, 10:58:53 AM »
I can’t send it to you because the AI steering system is something I purchased on the asset store. But I did reduce the amount of erratic movement significantly by changing some settings on the rig. I think this will work for me for now. Also that AI is a support character not an enemy, which is why the camera follows it too. Thanks for taking the time to help me, but I think this is pretty much solved for now in my situation.
Most Recent Published Games:
Juicy Theater - Android