GameSalad

Drag and drop and camera control

BasGoodboyBasGoodboy Posts: 310Member, PRO
edited July 2014 in Working with GS (Mac)

Hey all,

So I have an actor, which can be dragged and dropped to anywhere in the map, it's a cursor, which will get followed by 'special elite' force actors. So the cursor goes and the forces follow.

Now I made the map bigger, put camera control on the cursor actor (drag and drop actor) and made the camera control smallest.

Problem is, altho the map is big, and the camera control works, i can't drag and drop outside the normal device lines somehow.. it get's blocked at the borders it seems. The map is really bigger and camera control is set good.

I think the problem is with the drag and drop actor.

The rules of this actor:

-camera control

-If actor receives event > touch > is pressed
constrain attribute SELFPOSITION X to game.Mouse.Position.X
constrain attribute SELPOSITION Y to game. Mouse.Position.Y

Any ideas please?

Goodboi Gamestudios | Monster Jumper now on the App Store

Comments

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    Up

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    Up. Unfortunately still didn't figure this one out..

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Posts: 2,760Member, Sous Chef, PRO

    @BasGoodboy‌ -- you also need to take the camera's origin into consideration:

    Constrain Attribute: [ self.Position.X ] To: [ scene.Camera.Origin.X + game.Mouse.Position.X ]

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    Big awesome for you @RThurman! Gonna check tomorrow if it works proper.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Posts: 2,760Member, Sous Chef, PRO

    @BasGoodboy said:
    Big awesome for you RThurman! Gonna check tomorrow if it works proper.

    You are welcome. It probably won't work entirely "proper" (because there are yet other things to take into account) but it will get you unstuck and on your way again!

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    @RThurman this works, after some small repairments, proper now! Only, I want the touch actor not to be able to move so fast, because now, if you drag the touch actor through the whole scene, it goes very fast. I want a speedlimit on this. I can't figure it out.

    Anyone ideas?

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Posts: 2,760Member, Sous Chef, PRO

    Yup -- Thats one of the 'other things' I mentioned. Have you looked over any of the templates and/or demos that used camera control? (There used to be a half dozen or so on the forums).

  • UtopianGamesUtopianGames Posts: 5,670Member

    Would this help?

    http://www.deepblueapps.com/drag-around/

    Darren.

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    @RThurman couldn't find it.
    @DeepBlueApps Just downloaded it but it's not exactly what I ment, altho the 10* rule got my attention, which seem to be the speed.

    But I can't seem to integrate it on the right way.

    All I want is a mouse actor to be dragged around a big scene with a certain speed, without the certain speed it all goes too fast, this mouse actor will be followed by 'special forces' actors.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Posts: 310Member, PRO

    Anyone?

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • Any solutions for this "going fast" issue? @BasGoodboy

  • pHghostpHghost London, UKPosts: 2,059Member
    edited October 31

    @candemirag@candemirag.com said:
    Any solutions

    Please do not dig up more than three year old threads like this. @BasGoodboy hasn't been active on the Forums since August 2014...

Sign In or Register to comment.