Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - mukarillo

Pages: [1]
1
Support / Advanced Collision with angle
« on: September 27, 2015, 07:03:13 pm »
Hi there,

I'm using Advanced Collision to make a fighting game. I've managed to compare two rects to check for collision using this code:

Code: [Select]
float originX = (currentSprite.FlipX) ? -currentSprite.CurrentSprite.customColliders[i].origin.x : currentSprite.CurrentSprite.customColliders[i].origin.x;
Rect collisionRect = new Rect(
(gameObject.transform.localPosition.x+originX)-currentSprite.CurrentSprite.customColliders[i].Size.x/2,
(gameObject.transform.localPosition.y+currentSprite.CurrentSprite.customColliders[i].origin.y)-currentSprite.CurrentSprite.customColliders[i].Size.y/2,
currentSprite.CurrentSprite.customColliders[i].Size.x,
currentSprite.CurrentSprite.customColliders[i].Size.y);

But now i'm facing another problem, i got a sprite with a 45 degree angle, like this:

But when I run that code into this kind of image, this happen:


I coudn't find a way to rotate a Rect, how can i do that?

Thanks! :D

2
Support / Pixelated sprite blurred
« on: May 24, 2015, 05:46:12 pm »
Hi there,

I've got a sprite that is made in pixel art, but when i create a tk2dSprite, it's kinda blurry. There's a way to get the real image in-game?

Here's a example:


Thanks!

3
Support / Detecting collision between 2 Advanced Collider
« on: May 22, 2015, 02:32:42 am »
Hello there,

I'm making a fighting game and i need multiple boxes colliders in a single sprite, and the Advanced Collider functionality is perfect for it. But i don't know how to check if my hurtbox "overlaps" the hitbox.

I already tried to use this:
Code: [Select]
mySprite.CurrentSprite.customColliders[0]
But i don't know how to compare their both.

Can someone help me with that?

4
Support / Low fps on iPhone4
« on: June 25, 2013, 03:46:27 am »
Hello guys, Im doing this app aiming ios devices and i achieved a good result at iPad, but when i put the same app in iPhone4, it gets lagged and low fps(10 fps). I read a bit about what was doing that and now i think its aboult the shader... my project has 6 animated objects and more than 15 textures, some of them i tween. 99% of them have alpha and i think iphone4 is having some trouble to render it...

My question is: whats the best/fast shader to use for iOS iPhone4 for these objects with alpha??

Thank you very much,
Murillo.


PS: i got this shader from internet but it keeps spamming "Shader wants normals, but the mesh  doesn't have them" on console.


Shader "Scripts/NewAlphaShader" {
    Properties {
        _Color ("Color Tint", Color) = (1,1,1,1)
        _MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
    }
   
    Category {
       Lighting On
       ZWrite Off
       Cull Back
       Blend SrcAlpha OneMinusSrcAlpha
       Tags {Queue=Transparent}
       SubShader {
            Material {
               Emission [_Color]
            }
            Pass {
               SetTexture [_MainTex] {
                      Combine Texture * Primary, Texture * Primary
                }
            }
        }
    }
}

5
Support / Big Animation problem
« on: June 11, 2013, 11:38:36 pm »
Hello guys,

Im making this project where i have a huge animation texture with 120 frames.
I cant just put them in some atlas, because i'll need like, 60 of them to get all textutures.

What should i do?

Thanks.
Murillo.

Pages: [1]