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

Pages: [1] 2
1
Thank you!

2
Hello!

The word wrap is an amazing feature, of course.  However from time to time there is a period or another punctuation that happens at the end of a word that happens to be at the end of the line, and the period, without the word, is moved to the next line, so the last line in the block consists of a single period.

Is there a way to keep this from happening?

Thanks!!

3
Support / Re: How do you "hold down" a tk2dButton?
« on: February 01, 2013, 12:35:05 am »
If I'm not mistaken, just make sure there's a Collider on the object, and treat it like any other object.  While mouse down, cast a ray, and if the ray is hitting the object (which means clicking or finger on it), update a variable such as "beingTouched = true", and in the update(), " if (beingTouched){ }"

4
Releases / Re: 2D Toolkit 1.90 final
« on: February 01, 2013, 12:24:12 am »
I posted in your forums, but I think the problem I'm having with "Unknown identifier: 'tk2dTextMesh'.", could be from the new version, which I re-downloaded two days ago from the asset store.  The original project uses the older version, and the code does not throw an error.

5
I have used this code in another app that works fine, and I've tested this in a stand-alone script as well, which also fails.  The code is:

   GetComponent(tk2dTextMesh).text = "2";
   GetComponent(tk2dTextMesh).Commit();

The error, in unity without playing, is:

Assets/Scripts/createGameSelections.js(66,46): BCE0005: Unknown identifier: 'tk2dTextMesh'.

I'm not sure what to do about this, since it should work, right?

6
Support / Re: Fast Object's (bullets) not colliding
« on: January 03, 2013, 09:02:19 pm »
Using raycasts makes it happen less often, but it seems at sharper angles the bullet will still go through.

Likely the raycast isn't long enough -- at a sharper angle it needs to be longer to actually hit the edge of the ground object, or the next frame it may be too far past to register.  Unfortunately the longer the raycast, the further out it registers on flat surfaces, which looks silly when the bullet is destroyed too far away from a wall.

7
Support / Fast Object's (bullets) not colliding
« on: January 03, 2013, 05:24:06 am »
I swear I saw a post on this before, but I can't seem to find it.

I've got bullets that move fast, and often they skip the collider and go right through walls.  I've added a RayCast to them, as often suggested in the Unity forums, but that also misses it sometimes, so if you shoot at the right angle, you can still skip the walls.  I've even gone so far to add a 2nd ray cast to judge the distance between the projectile and a "wall" object, and destroy it if it gets too close, but often the ray doesn't even see the object, even though it's part of a tile set without any spaces.

Any one know how to fix this?

8
Support / Re: Sprites do not colliding, Animated Sprites do
« on: January 01, 2013, 10:45:32 pm »
Having a rigidbody on the bullet works if it is not set to kinematic.

9
Support / Re: Sprites do not colliding, Animated Sprites do
« on: December 31, 2012, 10:31:58 pm »
It's more likely that I"m doing something wrong :)

Can I ask a more basic question, since either way I'm just writing logic code right now and will be re-building whatever sprites/maps I've set up:

For a game like old NES 2d side scrollers, what kind of collider settings should be for the following:

* Player
* Enemies
* Ground/wall (assuming bullets are able to collide and be destroyed by them)
* Pickup items (assuming bullets can go through them, although they can still be collided by the player for pickup)
* Bullets (right now my bullets sometimes push back on my player, so I'm guessing I need to turn off the collider, but I'm not 100% sure how to manage the hit on other object?)

Thanks!

10
Support / Re: Sprites do not colliding, Animated Sprites do
« on: December 29, 2012, 09:51:35 pm »
Well, for the buttons I'm using (for touch input), mesh colliders don't show a z-axis option.  Is Trigger/Convex/Smooth Sphere Collisions are all unchecked, no material and mesh is the default.

For the bullet, there's a box collider, and the zsize is not touching the camera, and is wide enough to collide with any/all objects (it hits enemies properly).  I've added a rigidbody/kinematic to the bullet, but it does not change the reaction.  (going step by step, the collider on the bullet does cross the collider on the ground).

1.  Yes, the sprites/colliders are moving together.  I do not have a rigidbody on the sprite, as it didn't change anything.  (I do now, no change).  (Adding one on the ground sprite that the bullet first hits does nothing as well)

2.  Box colliders on both.

3.  Yes, they are intersecting.

4.  The bullet is moved with it's own script:  transform.position.x += (1000 * Time.deltaTime)




11
Support / Sprites do not colliding, Animated Sprites do
« on: December 29, 2012, 06:53:36 am »
Hello!

I have a bunch of sprites (pickups / map tiles) that have box colliders (player doesn't fall through).

I have animated sprites (player, enemies).

I have a "bullet" that when shot will go through sprites but will hit (and destroy on hit, as I've programmed it) when colliding with an animated sprite (enemy).  So it shoots through walls etc.



This may be similar to the problem I had (did not post about) regarding sprites used for touch-movement-controls -- in that case, the box-collider from the Toolkit app didn't allow for clicks/touches.  Replacing the collider with a box collider from the Components menu suddenly allowed the sprites to be clicked/touched.


Is there some reason why the sprites are not seeing collisions while the animated sprites are?

12
Support / Re: Sinking into Tilemap tiles (but not hand-copied ones)
« on: December 28, 2012, 02:30:48 am »
Ah, I see "Collider Depth"

13
Support / Sinking into Tilemap tiles (but not hand-copied ones)
« on: December 28, 2012, 12:37:34 am »
Hello,

My character seems to sink into tilemaps (all directions) but not into the tiles I created by hand (copy/paste) before I started to use the tilemaps.  Also, creating a new sprite tile shows but character does not collide.  All the colliders are set to Box Custom (without changes).  I try to expand the Z size of the collider, but when the game starts it returns to 0.2.

I'm not sure how, but the sprites I had been using for copy/paste have z size (of the collider) set to 100 and it does NOT change when the game starts.  They all come from the same sprite sheet.

The only difference seems to be the z size of the box collider -- is there a way to keep it from reverting to 0.2 (or even better to default to 100 or something bigger?) as it seems that the character falls through even though they're all on the same z-axis.

14
Support / Re: Loading Animated Sprites while Walking etc
« on: December 27, 2012, 07:27:08 pm »
Oh, ok :)  Cool.  Thanks!

15
Support / Re: Loading Animated Sprites while Walking etc
« on: December 27, 2012, 10:04:43 am »
Oh shoot, I thought I was done :)

What do you mean I'll need to change how I select and play clips?

Pages: [1] 2