background preloader

Code tutorials

Facebook Twitter

A quick question about physics actions and delta time [SOLVED] Movement and frame rate issues. Getting bundle identifier. Using device microphone to interact with objects. Facebook score api for game leaderboard - A full tutorial. GraphRequest( "me", HTTPVerb.GET, ( error, obj )... ERROR, what am I doing wrong? - prime[31] Support. Need help getting Prime31 getFriends Facebook event listener to work. Facebook and Unity Tutorial - Part One » Paladin Studios. C# Code coding Connect Facebook Unity development Facebook Facebook API Facebook SDK FacebookManager FB game development graph guide highscore Implement Inlog Intergrate Javascript JSON leaderboard leaderboards Manager SDK tutorial Unity unity3d webplayer A note before you start: This is a Unity tutorial about implementing Facebook in Unity projects.

Facebook and Unity Tutorial - Part One » Paladin Studios

It’s a technical how-to guide for Unity developers who want to use Facebook Connect in their web-apps. If that sounds interesting, read on! If it does not, you should check this out. Paladin’s games allow players to play with their friends, using Facebook. Warning! In this introductory post we’ll create a FB application, use the Javascript SDK to retrieve the current user’s friends and display their name in Unity. Setting up your application and development environment To get started, register your application over at Facebook. In-App Purchases in iOS 6 Tutorial: Consumables and Receipt Validation.

If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter.

In-App Purchases in iOS 6 Tutorial: Consumables and Receipt Validation

Thanks for visiting! Learn how to implement consumable In-App Purchases and validate receipts! This is a blog post by site administrator Ray Wenderlich, an independent software developer and gamer. Ios - Leaderboards based on facebook. Scores API. The Graph API for scores lets game developers publish game stories on news feed and timeline when a player earns a new high score or beats a friend's score.

Scores API

The user object as well as the app object have a scores connection that allows lets you manage scores for your app. Note that this API is only available to applications categorized as games. You can categorize your app as a games in the Developer app by navigating to About --> Basic Info and selecting Games in the drop-down menu in the category field. Prime31 IOS StoreKit with PlayMaker. Hello Everyone, Still very early, but I think it reached a state where it needs more testing, so I am realising now an alpha version of Prime31 IOS StoreKit port to PlayMaker.

Prime31 IOS StoreKit with PlayMaker

You will need obviously the Prime31 IOS storeKit from the asset store. Then you will need to set up your IOS application in Itunes to use IAP, and set up the products you want. you will also need to create testing accounts to test the IAP featurs, etc etc. so be prepared for some well known IOS application cumbersome set up. In the sample you will find in this package, DO NOT FORGET to inject your own product Identifiers in the action "Store Kit Request Product Data", and also DO NOT FORGET to inject your own secret Key in the action "Store Kit Validate Auto Renewable Receipt"

Stopping a rigidbody at target. Applying a force to reach some position is hard to control: the distance is a complicated function (integral) of force intensity, time and mass.

Stopping a rigidbody at target

A simple solution is to just zero rigidbody.velocity when the target is reached, but this produces a very weird and unnatural result - the rigidbody just stops at the target position. A better alternative is to use a feedback control algorithm, where the force is applied to reach a target velocity, and this velocity (clamped to some max value) is proportional to the distance to the target point - this way it will fall to zero when the target point is reached, stopping the rigidbody: This controller makes the rigidbody go in the targetPos direction - just set targetPos to the desired position, and the rigidbody goes there.

It doesn't rotate the rigidbody to the target direction, however - you may do it at Update. Moving player along path. What's the economical approach to "tethering" objects? [SOLVED] Sorry if what follows are a barrage of what might turn out to be stupid questions (in the sense that there's some incredibly immediate resource I should have seen and missed detailing exactly this) I picked up PlayMaker yesterday morning, spent the day watching some videos from the company's incredibly well documented YouTube channel and started experimenting today.

What's the economical approach to "tethering" objects? [SOLVED]

RigidbodyFPSWalker. Description This is a rigidbody based first person controller.

RigidbodyFPSWalker

Traditionally first person controllers are done using the character controller and this is the recommended way, but sometimes you want it to use real physics. So forces automatically affect the rigidbody, and joints can be used to eg. make a rope swinging game. The script works by adding a force in the direction of desired movement, it subtracts the current velocity from it, thus when letting go of all keys the character will stop. iTween Path swap. Hi guys, currently working on a runner game which uses lanes rather than movement.

iTween Path swap

Transform.InverseTransformDirection. Moving a fixed distance over a set time. Character Controller Jittering Problem. You have to apply "gravity" every frame, otherwise it pops out of the ground continuously.

Character Controller Jittering Problem

I remember providing some code to fix this at some point, on the forum, but the basic idea is that you just set moveDirection.y to the smallest negative value you can, every frame you're grounded, that fixes the issue. That way, when you walk off an edge, you aren't falling really fast immediately, which would happen if you just took moveDirection.y -= gravity * Time.deltaTime; out of the else statement. And no, the scripting example has never accounted for falling off an edge properly. Unity Pixelated shader. Loading bar with visual bar. Trail Arc Renderer. Author: Nick Gronow (Stick) Description Alright, this is my last trail renderer I will post (wink).

Trail Arc Renderer

This trail renderer is designed specifically with melee trails in mind. It will track the path of its parent object and create a fluid arc between its saved points. You can set the distance between saved points, which gives you control over the accuracy of the interpolation. Features. Get n-th parent. Since I'm working a lot with hierarchies in character rigs I often time face , like the 12th parent of an object (such as the root of the hand that's holding the prefab weapon), and having 12 get parent actions in a row is just such a bother... so here I added an int called repetitions. 0 means it works just like before, 1 means it gets the parent of the parent of the object .

The code might be a bit crude, but still, here it is: // (c) Copyright HutongGames, LLC 2010-2011. All rights reserved. namespace HutongGames.PlayMaker.Actions{ [ActionCategory(ActionCategory.GameObject)] [Tooltip("Gets the Parent of a Game Object. ")] public class GetParent : FsmStateAction { [RequiredField] public FsmOwnerDefault gameObject; [UIHint(UIHint.Variable)] public FsmGameObject storeResult; public int repetitions; public override void Reset() { gameObject = null; storeResult = null; repetitions = 0; } public override void OnEnter() { } else { storeResult.Value = null; } Finish(); } }}

Round Float with decimal places.

Video

Several Character Motor Functions. Hey mates. I bring to you today a few simple Actions that I made in order to expose a few function already present in the Character Motor script. RigidbodyFPSWalker. Description This is a rigidbody based first person controller. Traditionally first person controllers are done using the character controller and this is the recommended way, but sometimes you want it to use real physics.

So forces automatically affect the rigidbody, and joints can be used to eg. make a rope swinging game. Oscillating variable. Vector3Lerp2 now with deltatime multiplier option. Magnet Code. Can I make it affect character controllers too? Try this: How to create an IPA (Xcode 4.3) Using CharacterController.Move to move character to specific point. Character motor jump. Gravity with Character Controller. The CharacterController must be moved only with Move or SimpleMove. SimpleMove applies gravity automatically, but you can't control the vertical movement (no fly, no jump). The parameters passed to each function are different: SimpleMove receives the desired velocity vector (Y is ignored), while Move receives the displacement since last frame.

Unity 3.x Scripting-Character Controller versus Rigidbody. A simple third person controller. iTween for Unity ‹ pixelplacement.com. iTween for Unity Posted date: November 14, 2010 | 16 Comments November 14, 2010. Preparing your application for "In App Purchases" iOS Unity Asset Bundle Download Restrictions - Particle Effects, Animations, and Animated Assets.

Unity3D: 3rd person basic movement/rotation w/source. My original version of doing movement was a pretty sloppy hacked version. I provided the source, but it was almost impossible to really figure out what was going on. Scott Petrovic - Part 12.