Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please limit one question/topic per post.
Please provide the following details depending on types of question

▼ For question regarding Editor, please provide:
- Live2D Software Version: (e.g. Cubism Editor 3.1.02, Euclid Editor 1.2.02)
- OS & Version: (e.g. Windows 10, macOS HighSierra)
- PC Model: (e.g. MacBookPro 2017)
- Graphics Specifications: (e.g. GeForce GTX 950M)
- Memory: (e.g. 8GB)
- Illustration Software used: (e.g. Photoshop, ClipStudio, SAI)
- Attach screenshot or capture video to show your problem:
▼ For question regarding SDK, please provide:
- For us to reproduce the issue you wish to inquire about, please provide either a minimum project file which has the issue. or specific instructions on how to reproduce the issue.
- Types and version of Cubism SDK you are using.
▼ For question regarding Cubism Software License,
For issues related to purchasing, your order, license key, and subscription, please contact us via contact form:

how to make custom rubbing touch event

edited June 2016 in Help
What is the easiest way to implement a rubbing touch event similar to that in games such as Nintendogs?
what is including in the sample in SDK only have flick,tap,shake event.
To achieve something similar to the rubbing (loving stroke) in Nintendogs, the flickevent doesent seem to be relevent enough.
Should I add the logic in TouchesMoved or TouchesBegan? And How should I do it properly?

Another question would be, how do I loop an animation?(for instance,when I am rubbing one's head,the head down animation loops).

Thank you very much,
Any help is much appreciated.

sorry i post this in the wrong category...


  • Hello!

    I have an idea for the rubbing. I want to code it in to my game too as a small extra feature in a bonus mode, and this is how I will go for it. Maybe it helps you too, or you have ideas on how to improve it!

    The Live2D model has a hitbox, which I'll refer to as L2D_Hitbox. We want to have our cursor always on it, so that we're rubbing the actual character.

    Then, when we click (MouseDown) and hold down the mouse to "rub", we want to displace the mouse from its original position. We can do this by making a circular hitbox centered at the initial mouse position, and waiting for the user to displace the mouse (while still holding down) off of this circular hitbox.

    Like that, one rub is complete. If the mouse is still held down, you can make a new circle and continue the cycle (you might want to block off one half too, perpendicular to the initial rub and completed rub position, so that they have to rub to the opposite side)

    All of this, while that the mouse is on L2D_Hitbox remains true.

    I hope it helped!
  • @CBeam
    Thanks for the great answer! My I ask how you're preparing the 'L2D_Hitbox'? Are you modeling it in the Cubism Modeler?
  • @andi[email protected] The sample applications already have a way to detect via code if the user has clicked on the character or not, one way to emulate the "L2D_Hitbox" would be via that (I believe that its coded as "Hit Areas").

    Yeps, I'm modelling in the Cubism Modeller.
  • Ah, sorry, I completely failed in asking what I wanted to: Are you modeling any 'hitboxes' in the modeler? Let's say, for example, in case you only want to have the head 'rubbable'.
Sign In or Register to comment.