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.


Messages - xecut

Pages: [1]
1
Hi Unikron,

I am trying to make a parallax background like the demo u had.
I used a two tk2dcamera(s) to only render the mid-ground and foreground respectively.

The problem is when the mid-ground sprite is set to it own layer, it will turn out to be just black colour overlay. It returns to normal if I
set it back to default layer. But i need to set it to its own layer!

Anyone knows why is this happening?

Many Thanks!

2
Support / Box Collider vibrating
« on: May 15, 2013, 06:12:11 am »
Hi,

I want to make some objects there are pushable by player.

So I got some sprites that were attached with a rigidbody.
but they vibrates when the sprites landed on to a platform. Especially when rotated on the z axis, or when the character controller tries to push it.

How do I stop this?

my current gravity is -981...pretty high (using tk2dcamera.)
Is it the gravity's fault?

I am using a pushRigidBody script for my character controller too.
Code: [Select]
   void OnControllerColliderHit(ControllerColliderHit hit) {
        body = hit.collider.attachedRigidbody;
        if (body == null || body.isKinematic)
            return;
       
        if (hit.moveDirection.y < -0.3F)
            return;
       
        Vector3 pushDir = new Vector3(hit.moveDirection.x, 0, 0);
        body.AddForce(pushDir * pushPower);
    }

3
Support / Playing tk2dAnimatedSprite when Time.timeScale = 0?
« on: May 12, 2013, 03:00:04 pm »
Hi ,

I know its not possible to play an animation when Time.timescale = 0...

Is there a way to implement Time.realtimeSinceStartup and play the animation?

I'm really trying to make an animation to play in a pause menu.

Thanks.

4
Support / Re: tk2dButtons not working
« on: May 11, 2013, 05:33:45 am »
Thank you for your help, after putting colliders on the sprite, changed collider depth to 0.2 (shouldn't matter), and scaled z to 0.1, it worked!

5
Support / tk2dButtons not working
« on: May 10, 2013, 04:12:47 am »
I've set up a tk2dButton sprite, also I have setup the button down/up sprites.

But when I click on the sprite, there is no effect. the scale of the sprite is 675f, 675f, 675f. Pretty big.

Will that affect the sprite? if not, what did I do wrong?

I followed the steps from this tutorial http://www.youtube.com/watch?v=Sp2VOlaOBMk

6
Support / Changing Shaders Of tk2dAnimatedSprite
« on: May 09, 2013, 08:22:16 am »
Hi all,

Is it  possible to change a animated sprite's shader through code?

I tried calling  animation.renderer.material.shader = Shader.Find("myShader"); in update.
But the anmation tries to swap back to the preset shader every loop, and the sprite becomes flashing/flickering.


7
Support / Re: Using independent shader for a sprite
« on: May 02, 2013, 10:33:34 am »
LOL I'm blind

thank you btw!

8
Support / Using independent shader for a sprite
« on: May 02, 2013, 08:53:47 am »
Hi all, I am new to 2DToolkit and I need some help.

I've created a texture atlas, and of course, with a bunch of sprites inside.
I realised when I change the shader in one of the sprite, the entire texture atlas' shader changes as well.

So, is there a way to change one sprite's shader, but keeping it in the texture atlas?

Pages: [1]