article thumbnail

Physics and sprite animation dont works

Cocos

Basically the problem is here: sprite->runAction(RepeatForever::create(animate)); If i comment this line, it works. I made a small project to show: GitHub GitHub - paulocoutinhox/axmol-bomb-test Contribute to paulocoutinhox/axmol-bomb-test development by creating an account on GitHub.

Sprite 52
article thumbnail

[Tutorial]Outer Stroke Effect for 2D Sprites

Cocos

Original: [link] Author: BitByBit Outer Stroke Effect for 2D Sprites Continuing from the previous article Inner Stroke Effect for 2D Sprites Introduction In the last article, we introduced the method of inner stroke and also discussed its pros and cons. Now, the task of expanding by one circle has been completed.

Sprite 52
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Changing vertexData of a sprite in 2D in cocos creator 3.6.2

Cocos

Hello all, I am trying to change the vertices(vertex, index, position, uv) for the sprite in code at runtime. I was able to change the vertices of the sprite frame by assigning the values to sprite.spriteframe.vertices and setting sprite.setVertsDirty(), but in CC3.6 Any suggestion for best way to achieve this in CC3.6

Sprite 40
article thumbnail

Changing vertexData of a sprite in 2D in cocos creator 3.6.2

Cocos

Hello all, I am trying to change the vertices(vertex, index, position, uv) for the sprite in code at runtime. I was able to change the vertices of the sprite frame by assigning the values to sprite.spriteframe.vertices and setting sprite.setVertsDirty(), but in CC3.6 Any suggestion for best way to achieve this in CC3.6

Sprite 40
article thumbnail

Changing vertexData of a sprite in 2D in cocos creator 3.6.2

Cocos

Hello all, I am trying to change the vertices(vertex, index, position, uv) for the sprite in code at runtime. I was able to change the vertices of the sprite frame by assigning the values to sprite.spriteframe.vertices and setting sprite.setVertsDirty(), but in CC3.6 Any suggestion for best way to achieve this in CC3.6

Sprite 40
article thumbnail

Changing vertexData of a sprite in 2D in cocos creator 3.6.2

Cocos

Hello all, I am trying to change the vertices(vertex, index, position, uv) for the sprite in code at runtime. I was able to change the vertices of the sprite frame by assigning the values to sprite.spriteframe.vertices and setting sprite.setVertsDirty(), but in CC3.6 Any suggestion for best way to achieve this in CC3.6

Sprite 40
article thumbnail

Handle the collision of sprites

Cocos

I’m trying to handle the collision of two sprites, i added BoxCollider2D to the sprites. One sprite can jump (changing the y coordinate through animation), named "character ", the other is a static object, named “key”. code for the "character ". code for the “key”. code for the "character ". start () {.

Sprite 40