Mouse controller speed?

This forum is currently in read-only mode.
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • Hi,

    Is there away to slow down or vary the mouse behavior speed that has a sprite connected to it?

    Thanks

  • studied this recently lol just put an action on your 'start layout event and set mouse scroll speed, woot woot i know something

  • Great! Thanks for info, just need a bit of help doing this, I'm very new here.

    I created the start of Layout event but i can not find scroll rate for mouse behavior in actions list? i'm running 99.42 of Construct

    thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • well u have to insert a keyboard/mouse object into the layout first, after that the option will be available

  • Thanks for the help. I have a mouse and keyboard object in layout and can set visibilty of mouse pointer etc, but i can't see an option to set scroll speed? I checked the wiki and can't find a reference to this option, though i can see these outlined here http://sourceforge.net/apps/mediawiki/construct/index.php?title=Mouse_%26_Keyboard_Object

    Thanks.

  • can't find this either. Not that i need it right now, but i got curious.

  • Why not just use math instead of mouse behavior?

    Have a look at

    http://www.scirra.com/phpBB3/viewtopic.php?f=16&t=1865

    and

    http://www.scirra.com/phpBB3/viewtopic.php?f=3&t=2055&p=15393

    Or do I misunderstand what you are trying to achieve?

  • hi tulamide,

    The first link is pretty close to what i'm trying to achieve. Take out the angle to mouse and the sprite follows the mouse at a slower pace, which is what i'm trying to do.

    the only thing that i would like to try and tweak is to make the sprite move a constant speed no matter how fast I move the mouse...

    thanks

  • Is this what you are trying to do: Move at Angle example

    The sprite should move towards the mouse at a constant speed.

  • I think you pointed to the right direction, uberlou. Even if not, at least I learned something again

    And if you don't mind, I added TimeDelta to the move at angle action, as well as adding the set angle towards position action, also with TimeDelta, to make it really behave constant

    http://www.filedropper.com/movingconstantly

    4ror, I hope you finally found what you were looking for?

  • Thank you both! Looks like Uberlou's cap file is the solution I'm after. Tulamide I think your link is not working though, would be interested to see what you came up with.

  • Tulamide I think your link is not working though, would be interested to see what you came up with.

    I'm sorry. I don't know what happened to the file upload. I try another hoster now and share a slightly different version (deceleration added). Hope the link works this time *cross fingers*

    http://www.mediafire.com/file/ojmtyiiwgtd/MovingConstantly.cap

  • No problem 4ror.

    And if you don't mind, I added TimeDelta to the move at angle action, as well as adding the set angle towards position action, also with TimeDelta, to make it really behave constant

    I don't mind you editing my file at all, though I was under the impression that the expressions I used already applied timedelta. Your lerp solution is probably better anyway since you'll get closer to the mouse position.

  • I don't mind you editing my file at all, though I was under the impression that the expressions I used already applied timedelta. Your lerp solution is probably better anyway since you'll get closer to the mouse position.

    Yes, that's strange. I thought the same, but when I tested your solution with framerate mode unlimited the movement was much quicker than in v-synced mode. But somewhere I read about built-in features being timebased instead of framebased, but maybe that only applies to behaviors?

  • Hi Tulamide, I like the your deceleration control, this is an interesting feature I hadn't thought about. I also like Uberlou's method by way of increasing the distance the mouse pointer has to move away from the sprite before the sprite will start to follow the mouse. This will help reduce 'slight' or unwanted mouse gestures, whereas, 'purposeful' or long mouse movement is key to the control system I want to achieve.

    Happy days, thank you both again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)