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 - xclouder

Pages: [1]
1
Support / TiledMap cannot import Object Layer?
« on: May 26, 2015, 03:41:08 am »
I know tk2d has can attach a collider on a tile.   But it is inefficient since I have to edit every tile representing a wall,particularly when the map image changes frequently.


I need edit the "collider" in tmx file as a ObjectGroup Layer.  Does tk2d support this feature? This will be efficient for collider editing!

2
Support / Re: TiledMap shaking when camera follow player
« on: March 01, 2015, 06:45:57 am »
 >
How many pixels of padding (should be one or more)  are you using and how is your camera set up?

I am a beginner, could you show me where to set the pixels of padding?

My camera setting screenshot see the attachment.

Thank you!

3
Support / Re: TiledMap shaking when camera follow player
« on: February 09, 2015, 03:47:24 am »
I uploaded a video to show the problem:http://youtu.be/8uswMQnmJJI

I have no physics used.

This is my camera follow code:

   // Update is called once per frame
   void LateUpdate () {
        float player_x = targetToFollow.position.x;
        float player_y = targetToFollow.position.y;
       
        float rounded_x = RoundToNearestPixel(player_x);
        float rounded_y = RoundToNearestPixel(player_y);
       
        Vector3 new_pos = new Vector3(rounded_x, rounded_y, -10.0f); // this is 2d, so my camera is that far from the screen.
        tr.position = new_pos;

//        tr.position = new Vector3(targetToFollow.position.x, targetToFollow.position.y, -10f);
   }

    public float pixelToUnits = 100f;
   
    public float RoundToNearestPixel(float unityUnits)
    {
        float valueInPixels = unityUnits * pixelToUnits;
        valueInPixels = Mathf.Round(valueInPixels);
        float roundedUnityUnits = valueInPixels * (1 / pixelToUnits);
        return roundedUnityUnits;
    }

4
Support / TiledMap shaking when camera follow player
« on: February 05, 2015, 02:27:35 am »
I want to create a RPG game using TileMap, the camera follows my player.
When the player moves, the map looks a little shake.

The map is created followed the tutorial here:http://www.unikronsoftware.com/2dtoolkit/docs/latest/tilemap/tutorial.html
Except that my camera is not the tk2dCamera, but the Unity default camera.Does that matter?

I have set the SpriteSheet Config "pad" to "Extend".


Pages: [1]