15,901,035 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12376177 (Top 9 by date)
Member 12376177
17-Mar-16 7:09am
View
Okay thank you for the help. I appreciate it. I think I get your idea now.
Member 12376177
14-Mar-16 8:51am
View
Ok thanks, I'll check it out. But wouldn't the player eventually reach the end (on the pictures you sent) I don't want that to happen.
Checked the asset store thingy out, seems like most of it is outdated and on old APIs
Member 12376177
13-Mar-16 13:10pm
View
This is how everything functions right now.
http://imgur.com/m7BXWzi
Everything in the picture (Except the first few blocks of grass to stand on) Follows the camera which is following the player so everything moves along.
This is just a basic setup to see wether or not the scripts would work, and obviously something is amiss.
Member 12376177
12-Mar-16 8:18am
View
How would I go about creating a trigger for the objects which spawn in my platforms? The objects are always infront of my character (Moving with the camera) So my player never get's close to them, how would I trigger them?
Member 12376177
11-Mar-16 7:31am
View
Well I'm very new to C#. What I am trying to do with my spawn script is just having whatever prefabs i have the script on spawn randomly ingame (endless runner kinda thing)
When it comes to the destroyer script, It won't remove the objects unless I have that code there and I don't know as to how I am to change it.
Member 12376177
10-Mar-16 15:18pm
View
Unfortunately that didn't change anything. How would i stop them from spawning on eachother? The problem of getting infinetly spawned blocks is stopped by my destroyer script, it destroys everthing it touches witch is everything witch is behind my player. So there's really never very many objects ingame at the same time.
Member 12376177
9-Mar-16 6:55am
View
Well I played around and I managed to make it a little bit better. Changing the Z axis on the prefabs location to be higher than the cameras Z axis seems to have helped a bit but many blocks are still going invisible.
Member 12376177
8-Mar-16 18:57pm
View
Yeah sorry for reposting but I've been stuck here for quite a while now. I checked and there is no difference between the visible and the invisible block. The sprite renderer is on both of them and they have the same scale and rotation.
Member 12376177
8-Mar-16 13:43pm
View
How would they be deactivated? The only thing I can think of is my destroyer script. It destroys any objects which is behind the Player. But it's not supposed to destroy things infront of it and it completely destroys objects it touches not just the rendering. But maybe there's something wrong in my code?
using UnityEngine;
using System.Collections;
public class DestroyerScript : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == ("Player"))
{
Debug.Break();
return;
}
if (other.gameObject.transform.parent)
{
Destroy(other.gameObject.transform.parent.gameObject);
}
else
{
Destroy(other.gameObject);
}
}
}
Show More